This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Portable Cygwin: replacing drivename in a text file


I can't get the syntax quite right.
Can anybody help, please? Thank you very much.

Thanks very much indeed for various suggestions, much appreciated. I guess by yakking on about "drivename" I moved the focus of my question to its practical application and thereby managed to blur things. My real question is

Given the string 123 how can I use sed to change it to 1$HOME3 or, in my
case, 1/home/user3. Various combinations of ' " and ` (also arbitrary
separators) all fail as in

echo 123 | sed 's/2/"$HOME"/g'
echo 123 | sed 's/2/`$HOME`/g'
echo 123 | sed "s/2/'"$HOME"'/g"
echo 123 | sed 's/2/@$HOME@/g'

Thank you (again).

Fergus



--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]