The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-29-2008
Aejaz Aejaz is offline
Registered User
 

Join Date: Apr 2008
Posts: 18
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
Reply With Quote
Forum Sponsor