![]() |
|
|
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. |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
0121 -> 0*/1*/2*/1 using SED?
As per the title, though the number could be any length. Code:
# current=0123 # echo $current 0123 # echo $current | sed 's/\([0-9]\)\([0-9]\)/\1*\/\2/g' 0*/123 I would understand this outcome if I'd not used the Global switch, but I was expecting (and hoping for): Code:
0*/1*/2*/3 Any ideas what I am doing wrong?! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|