Find String in FileName and move the String to new File if not found

Hi all,

I have a question..

Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if it is not there...then I would want them to be written to a new file or print them...please let me know how this can be achieved...this is on linux server...

Thanks for the Help

Hi,

For Display File Names With out digit

ls -ltr | awk -F' ' '$8 !~/[0-9]/ {print $8;}'

For Display File Names With digit

ls -ltr | awk -F' ' '$8 ~/[0-9]/ {print $8;}'

Cheers,
Ranga:)