Here is my unix 1 liner of the day. I wrote this to copy only the unique subset of a file name into a temporary directory.
THISID=""; for I in `ls -1 *.pdf`; do if [ "$THISID" != `echo $I | sed 's/_client.*//'` ]; then cp $I /export/home/hplunket/print_vendor_tmp/; fi; THISID=`echo $I | sed 's/_client.*//'`; done
