![]() |
|
|
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 |
| ld: fatal: relocations remain against allocatable but non-writable sections | tdallagn | SUN Solaris | 0 | 05-21-2008 08:58 AM |
| how to delete content in a file (delete content only) | kittusri9 | Shell Programming and Scripting | 5 | 05-15-2008 02:12 PM |
| Delete ^ using sed | us_pokiri | UNIX for Dummies Questions & Answers | 5 | 04-22-2008 02:20 AM |
| Can't delete anything in /usr | ms1951 | UNIX for Dummies Questions & Answers | 4 | 10-22-2004 12:49 PM |
| delete | lesstjm | UNIX for Dummies Questions & Answers | 3 | 11-08-2001 03:24 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
delete and remain 2 value
Hello Friend,
I have the followint command to delete 4th field and move forward. Can I delete all filed and just remain the first 2? sed -e "/^[ ]*<Number/s/\([^ ]\) \([^ ]\)/\1\2/g" -e "/^[ ]*<Number/s/\([0-9][0-9][0-9]\)./\1/" -e "/^[ ]*<Number/s/\([0-9][0-9]\)/\1 /g" -e "/^[ ]*<Number/s/0</</" file input <Number>00000000<Number> <Number>0123456<Number> <Number>4403459411<Number> output <Number>00<Number> <Number>01<Number> <Number>44<Number> |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|