The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #1 (permalink)  
Old 07-15-2006
sirtrancealot sirtrancealot is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 13
Extracting specified line from a file using awk

Hi,
I am just trying to extract a line at a time from a file using awk and can't yet extract even the first line using the following:-

awk '/(^[a-zA-Z0-9]) && (NR==1)/ {print $1}' file1

Is there an obvious silly error here?

Thanks