| PLEX86 | ||
|
help with bash scriptHello, I have 2 problems on suse 9.3 and I'm not experienced enough to be able to solve the problems myself: 1) I need a (bash preferably) script which can delete all sub-directories except those named "0", "constant", "system" and "data". So I'll probably need something with a pipe but what causes me problems is that I don't know how to exclude these directories from removal. I was thinking about something with "xargs rm -r" in combination with "find" perhaps? 2) I need to extract data from the file called result.dat.txt from within each subdirectory and only one line (for instance line nr. 20 from the top of the file) from within each result.dat.txt-file, should be put into (and appended) to a file: "bigresult.dat.txt". How would I do this? The directories are called something like (0, 0.5, 1, 1.5, 2, 2.5 3... or similar), i.e. starting from zero and with an interval the number of the directory gets bigger. So I buttume there's no need for a sort-command, since I think the directories are already in the correct order when they were written. Thanks in advance for anyone who can help me or at least lead me closer to a solution. Med venlig hilsen Best regards Martin J¿rgensen FC3 chinese printing 4937 Kill Bill I trend to believe this is a ghostscript problem. I have another RedHat... -- ---------------------------------------------------------------------------
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||