Bob:
I like your efficient solution, but I want to clarify what's actually
happening in the line, especially the grep stuff.
I know the { s// } is a substitution regexp. It's looking for a
filename ending in ".tiff", then substituting ".pdf" for ".tiff".
To me the subst regexp looks like a file rename. If it's not, how do I
interpret such a regexp?
The "&& !-f" I think means "and do not look for file input".
The "@ARGV" I assume takes the command line parameter which I assume is
the directory to look in for the files.
The last bit: "*.tiff" is probably looking for the TIFF files to base
the compare/search on.
Basically you could say I don't know what's happening in this line.
Could you take the time to elaborate more on this?
Thanks for any help?
Regs
Rupert Heesom
Asst Distribution Engineer
Adventist World Radio
A one-liner like the following will print the names of the
missing .pdf files:
$ perl -le 'print $_ for grep { s/\.tiff$/.pdf/ && !-f } @ARGV' *.tiff
Only one array is needed if you just want to compare in one direction.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]