![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| converting hex to dec | aismann | Shell Programming and Scripting | 4 | 02-26-2008 01:51 AM |
| Converting \0 to a \n | ajcannon | Shell Programming and Scripting | 2 | 09-28-2007 08:30 AM |
| Converting | seeyou | SCO | 3 | 01-19-2006 10:22 AM |
| converting .txt | laila63 | UNIX for Dummies Questions & Answers | 4 | 06-30-2004 01:56 PM |
| converting kb to mb | csaunders | UNIX for Dummies Questions & Answers | 1 | 02-26-2004 12:14 PM |
|
|
LinkBack | Thread Tools | 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 05:23 AM. |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
like abc=`echo "a/b/d" | sed 's#/#\\/#g'` |