![]() |
|
|
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 |
| help needed | nnayagam | Shell Programming and Scripting | 2 | 03-07-2008 06:34 AM |
| Little help needed. | Netghost | AIX | 5 | 08-10-2006 03:29 PM |
| Help needed | dsravan | Shell Programming and Scripting | 2 | 07-20-2006 10:37 AM |
| awk help needed. | cskumar | Shell Programming and Scripting | 0 | 07-20-2006 08:24 AM |
| Sed help needed | stevefox | Shell Programming and Scripting | 5 | 12-05-2005 01:44 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
help with sed needed
Hi,
I have a file in a form of jkkhjjk1:!:jkhdjkhjkh2:!:kljkljkljklj3:!:kljsdj4 kljlkfljf5:!:kjljljlj6:!:jhjkhjkh7 I am trying to use sed command such that everytime it find ":!:" it will removes it and print remaining of the line on the new line Output that I need will look like following jkkhjjk1 jkhdjkhjkh2 kljkljkljklj3 kljsdj4 kljlkfljf5 kjljljlj6 jhjkhjkh7 At this time I am using this sed -e 's/([0-9]):!:[\|]*/:/g' $STATS_FILE > $TEMP_FILE && mv $TEMP_FILE $STATS_FILE tr -s ':' '\n' < $STATS_FILE > $TEMP_FILE && mv $TEMP_FILE $STATS_FILE yet I was wondering if there is a way to do it with a single sed command thanks in advance |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|