If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > help with sed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-21-04, 07:11
viranihardik viranihardik is offline
Registered User
 
Join Date: Mar 2004
Posts: 11
help with sed

Hello everyone,
I have a file containing:
River_basin Varchar2(70)
Site Varchar2(70)


I need to delete everything after the first column(variables) using sed
i.e. I need to get just the first column :
River_basin
Site



Thanks in advance,
Reply With Quote
  #2 (permalink)  
Old 03-21-04, 07:44
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
Try this :
Code:
 sed 's/[[:space:]]\+.*$//' inputfile
__________________
Jean-Pierre.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On