in reply to Re: Automatically Rewrite Shebang Line on Multiple Files
in thread Automatically Rewrite Shebang Line on Multiple Files
for %q in (*.cgi *.pl) do ( perl -pi.bak -e"s{^#!/usr/bin/perl}{#!/usr/local/bin/perl}" "%q" )
Change for to for /r for a recursive solution.
Update: Simplified solution
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Automatically Rewrite Shebang Line on Multiple Files
by spickles (Scribe) on Feb 16, 2009 at 22:22 UTC | |
by ikegami (Patriarch) on Feb 16, 2009 at 23:30 UTC |
In Section
Seekers of Perl Wisdom