in reply to Search & Replace in subdirectory files
# perl -p -i.bak -e 's/bilbo/frodo/g' *
This (at command prompt) will change all instances of 'bilbo' to 'frodo' in all files in the directory, creating a backup called filename.bak.
Not really sure how to make it recurse subdirectories other than adding /* on the end for each level needed:
# perl -p -i.bak -e 's/bilbo/frodo/g' */*
Be careful...
This (at command prompt) will change all instances of 'bilbo' to 'frodo' in all files in the directory, creating a backup called filename.bak.
Not really sure how to make it recurse subdirectories other than adding /* on the end for each level needed:
# perl -p -i.bak -e 's/bilbo/frodo/g' */*
Be careful...
bassplayer
In Section
Seekers of Perl Wisdom