November 4th, 2003, 01:25 AM
I'm new to Unix but am trying to use awk to parse a directory to determine if the files in it are relevant.
They are all named something like arch_1_xxx.arc where the xxx is a number.
Can anyone offer me clues as to how to break up the file names?
I thought I would `ls` the directory into a file and then parse the file...I've spent hours trying to work it out and well.....
At the end of the process, I have to move relevant files to another location.
November 6th, 2003, 06:52 PM
you can do all that with shell, grep and xargs:
ls -al dirname | grep 'thing_to_match' | xargs command[code]
probably not much help, but give us more info about what you're doing with these files and the answer is yours
This is me: http://chris.uk.com