I have a coyple of files on my harddisk and on a mobile usb-disc.
Their names are of that pattern:
where 'soemthing' can be totally different from file to file and
'<checksum>' is a checksum, which does not match the checksum of the
I want to delete the files on my harddisk, which has a '<checksum>'
which matches the '<checksum>' of the according file on the mobile
The problem arises from a line of the shellscript I wrote.
# code to extract the checksum from the file and put into
# a variable named crc
if [ -f <path to the mount point of the mobile disk>/*$crc* ] ; then
# remove file on PC harddisk here
As soon the file is not found, the script ends with an 'Not found'
error, which '-f' is exactly for, because the expanding comes before
So I need something else or a try-catch-thingy to make that work...but
Or do I miss the forest for the trees here... ;)
Thanks a lot for the forest in advance!