Portable Cygwin: replacing drivename in a text file

Alexandre Bezroutchko abb@gremwell.com
Thu Nov 25 17:39:00 GMT 2010


> you can use a different separator in the sed command.
> You can use the following line
>> echo 123 | sed "s%2%${HOME}%g"

Right, this will work in most cases. But will fail if $HOME happens to 
contains % sign.
The version I have suggested in the previous post is more robust.
Best regards,
Alex
www.gremwell.com
>> Regards
> Dirk
>>> -- 
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /