The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: awk script help
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 11-24-2008
shehzad_m shehzad_m is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 31
Quote:
Originally Posted by Franklin52 View Post
Try this:

Code:
awk '{s=s?s":"$1:$1}END{print s}' file
I am getting an

awk: syntax error near line 1
awk: illegal statement near line 1