![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Backslash in find command | findprakash | UNIX for Dummies Questions & Answers | 1 | 08-24-2008 10:43 AM |
| Sed and awk backslash characters | potro | Shell Programming and Scripting | 7 | 05-19-2008 05:34 AM |
| How to handle backslash in grep string | rajbal | UNIX for Advanced & Expert Users | 6 | 06-18-2007 05:22 PM |
| How ro handle backslash character in grep? | rajbal | Shell Programming and Scripting | 1 | 06-18-2007 05:19 PM |
| backslash issues | Bab00shka | UNIX for Dummies Questions & Answers | 5 | 07-09-2004 05:53 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
I played around with it a bit, and the only way I could get the original varialbe to set properly was to set it like this:
var="c:\\\ndm\stores" I got the "command garbled" error you're getting, but only when stuffing the results of the echo|sed command into a variable. If I just run that one on the command line against the variable, I get no error. I don't know what's different, though. Possibly, sed doesn't like the back-ticked environment of the script command. |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Anyway to assign it to a variable?
|
|
#10
|
|||
|
|||
|
How about avoiding echo? Note the single quotes to stop shell interpreting \ .
var='c:\dir1\dir2\name' cat <<EOF $var EOF Output is: c:\dir1\dir2\name |
|||
| Google The UNIX and Linux Forums |