![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SED Substitution | shubhranshu | Shell Programming and Scripting | 1 | 11-11-2008 04:50 AM |
| help with awk substitution | daytripper1021 | Shell Programming and Scripting | 3 | 09-08-2008 10:58 PM |
| ksh substitution | solea | Shell Programming and Scripting | 2 | 08-09-2004 06:30 AM |
| sed substitution | jo_aze | UNIX for Dummies Questions & Answers | 3 | 06-23-2002 10:32 PM |
| substitution | supercbw | Shell Programming and Scripting | 1 | 06-07-2002 04:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Try also with tr ,perl and awk:
Code:
[/tshome/tf01 ]>x="ashdkhsa-sdasldhals-sadakjsh-" [/tshome/tf01 ]>echo $x | tr "-" "/" ashdkhsa/sdasldhals/sadakjsh/ Code:
perl -ne 's/-/\//;print;' filename Code:
[/tshome/tf01 ]>echo $x | awk '{gsub(/-/,"/",$0); print; }'
ashdkhsa/sdasldhals/sadakjsh/
|
|
||||
|
how many spaces are you talking about?
you can use any one of the methods above. I would try this: Code:
sed 's/ / /' filename Code:
man sed |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|