![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| converting hex to dec | aismann | Shell Programming and Scripting | 4 | 02-26-2008 05:51 AM |
| Converting \0 to a \n | ajcannon | Shell Programming and Scripting | 2 | 09-28-2007 11:30 AM |
| Converting | seeyou | SCO | 3 | 01-19-2006 02:22 PM |
| converting .txt | laila63 | UNIX for Dummies Questions & Answers | 4 | 06-30-2004 04:56 PM |
| converting kb to mb | csaunders | UNIX for Dummies Questions & Answers | 1 | 02-26-2004 04:14 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
sed converting / to \/
Hi all,
I am using sed for converting a string of type /abc/def/gh by \/abc\/def\/gh [trainee@LINUX ~]$ edu="/home/abc/dec" When I echo that variable and pass it to sed ,it works fine... [trainee@LINUX ~]$ echo $edu|sed 's/\//\\\//g' \/home\/abc\/dec But When I try to store in a variable , it shows the following error [trainee@LINUX ~]$ ued=`echo $edu|sed 's/\//\\\//g'` sed: -e expression #1, char 9: unknown option to `s' HELP BLEAZ Last edited by sakthi.abdullah; 12-12-2006 at 09:23 AM.. |
|
||||
|
Quote:
like abc=`echo "a/b/d" | sed 's#/#\\/#g'` |
|
||||
|
Quote:
|
| Sponsored Links | ||
|
|