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 -->
  #2 (permalink)  
Old 01-05-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,365


Code:
awk '
{ a[NR]=$1 }
 END { for(i=1;i<=NR;i++) printf "%1.11f\n", a[i] }
' 1.csv > test

Of course, if you just want to format the file:


Code:
awk '{ printf "%1.11f\n", $1 }' 1.csv > test