The UNIX and Linux Forums  

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



Thread: changing format
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 01-31-2008
ghostdog74 ghostdog74 is offline
Registered User
 

Join Date: Sep 2006
Posts: 1,582
Code:
awk 'BEGIN{FS=",";OFS=" "}
{ $1=$1; print NR-1 , $0 }
' "file"
Reply With Quote