http://qs321.pair.com?node_id=213922


in reply to (1) line of sh vs (~20) lines of perl ?

VSarkiss mentioned it parenthetically, but it needs to be emphasized: your "one line of sh" is really just an invocation of a much larger program called "find". You could do the same thing in Perl with system or exec commands.

The interesting thing is that with Perl you created your own program to find the files for you. And it seems that you did it quickly, easily, and portably -- in just a few lines of code (even fewer for some of the respondents). And if you wanted to, you could extend the program to perform tests that aren't easy to do with "find" (e.g. "File owner matches a record in an Oracle database"). You could do that with sh, but would you want to?

So what are you missing? Some respect for what you just accomplished, and for the language that makes it possible.

buckaduck