I'm making a script that will transfer some files from CD to harddrive. The files on the cd are in the format of:
I would like to end up with a file in the /tmp/ directory called _1.txt with these two entries:
This file will be used as a user selectable wildcard list.
Here's what I have so far:
ls -1 /mnt/cdrom/[0-9][0-9]???200[0-9]* | tr -d "/mnt/cdrom/" | <unknown> | sort -u > /tmp/_1.txt
What would be the correct syntax for awk or sed to match this: [0-9][0-9]???200[0-9] and just pipe it to "sort -u" so that it can be written to the /tmp/_1.txt file?