No such thing as a small change | |
PerlMonks |
Directory Recursion from the Command Line?by dvergin (Monsignor) |
on Apr 15, 2003 at 04:32 UTC ( [id://250472]=perlquestion: print w/replies, xml ) | Need Help?? |
dvergin has asked for the wisdom of the Perl Monks concerning the following question:
I don't use one-liners routinely, but when the boss-man asked for a quicky to make the same change in 150 files in a directory, I dashed off:
...and looked like a hero. Then he said, "Make it work for a whole directory branch." I was stumped. I can (and did) write a short script to do this. But I have a lingering suspicion that there is some command-line magic that can, in effect do: Where the '-r' switch works as in other Linux commands to cause the requested operation to be performed on all directories including and under the current one. Sadly, there is no '-r' switch for the Perl executable. Does anyone have a quick command-line hack (rather than a script) to accomplish the requested task.
------------------------------------------------------------
Back to
Seekers of Perl Wisdom
|
|