![]() |
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 |
| 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 |
| replacing strings with text from other file | mc1392 | Shell Programming and Scripting | 1 | 03-24-2008 03:46 PM |
| Extracting data from text file based on configuration set in config file | suparnbector | Shell Programming and Scripting | 3 | 08-10-2007 02:25 AM |
| Extracting the lines between 2 strings of a file | babloo | Shell Programming and Scripting | 2 | 02-14-2007 11:27 AM |
| Help with extracting strings from a file | cmsdelhi | Shell Programming and Scripting | 7 | 01-12-2007 09:49 AM |
| Extracting strings | hugow | UNIX for Dummies Questions & Answers | 1 | 06-24-2005 06:09 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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! |
|
||||
|
thanks jim! the code was a big help and i especially like the sorted output!
my problem is now reduced to the following: 1. how can i exclude the lines without "..................................." (the first 5 lines and last 2 lines in the file) 2. for lines with strings in the first column that are not suffixed by " ** ", how can i keep the rest of the line from being displayed? (only the string in the first column should be displayed) does anyone have any ideas? thank you! |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|