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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-25-2008
kinksville kinksville is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 7
No such luck

Quote:
Originally Posted by aigles View Post
The valid syntax is :

Code:
FS  = "([[:space:]]|\\.|QF|=|x)+";

Quote:
Originally Posted by aigles View Post
The get the last field without prefixing digits :

Code:
last_field=$NF
sub(/^[0-9]*/, "", last_field);

Jean-Pierre.


Neither of those snippets worked correctly for me. The FS syntax that you used probably changed the number of fields and so they didn't all get printed out.

The second snippet just seemed to add the #1 to the last field ie (,619MENCHIES1).

I'll play with it some more and see what happens.