![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to delete text from line starting pattern1 up to line before pattern2? | repudi8or | Shell Programming and Scripting | 5 | 04-15-2008 09:25 PM |
| how to delete line with matching text and line immediately after | orahi001 | UNIX for Dummies Questions & Answers | 6 | 01-15-2008 12:34 AM |
| delete the last line | srivsn | Shell Programming and Scripting | 3 | 02-07-2006 06:55 AM |
| delete a line based on first character of the line | borncrazy | UNIX for Dummies Questions & Answers | 2 | 12-06-2005 03:27 PM |
| sed 's/~/\^J/g' how to get "^J" on same line as rest of the command. | Optimus_P | UNIX for Dummies Questions & Answers | 6 | 07-19-2001 09:23 PM |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Delete rest of the line
Hi, can anyone please answer my question in deleting the rest of the line. I have an example below of a file contaning:
Serial3/1.5 43.70.195.13 YES NVRAM down down Serial3/3 225.94.155.69 YES NVRAM up down Serial3/6 unassigned YES NVRAM administratively down down Serial3/7 unassigned YES NVRAM up down ATM2/0 unassigned YES NVRAM up down My question is how do I delete the rest of the line except the first word from each line. My result should be Serial5/1.5 Serial3/3 Serial 3/6 . . . Regards, Aejaz |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|