[ale] sed
David Tomaschik
ozone at webgroup.org
Fri May 18 19:28:37 EDT 2007
Marvin, International Martian of Mystery wrote:
> timothy at meanor.net wrote:
>> Here's another perl solution:
>>
>> perl -p -i.bak -e "s/abc/xyz/g" file
>>
>> where "file" is the file you want to change.
>>
> What would be the syntax if "file" had spaces in it? Would you escape
> the spaces, or would you double-quote the variable?
>
>
> For sed and perl, preferably. :-)
At least for sed, the only place the file string would be
interpreted/globbed is by the shell. Thus, file\ with\ spaces and "file
with spaces" would be equivalent.
David
More information about the Ale
mailing list