The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 09-20-2007
Deanne Deanne is offline
Registered User
 

Join Date: May 2007
Posts: 27
Question extracting a set of strings from a text file

i have textfiles that contain a series of lines that look like this:

string0 .................................................... column3a column4a
string1**384y0439 ..................................... column3b column4b
string2**23903990 ..................................... column3c column4c
string3 .................................................. column3d column4d
string4**67823678 ..................................... column3e column4e

can you help me write a C-shell script that will list all the unique strings before the ** ?
if a string is not followed by ** (eg. string0 and string3), the string should be in the list, whether or not it is unique.
I think I need to first filter out the lines without .................................. (which are always at the beginning and end part of the textfile).

can anyone help me with this please?
thanks a lot!
Reply With Quote
Remove advertisements
!!
!! Forum Sponsor