hi, any problem manipulating (swap coloumn n replace)
example :
File sebelum.txt
1A6Y173BPHE-75.1167.5
1A6Y174BGLY58.7155.7
1A6Y175BARG-18.1142.6
1A6Y176BILE-72.6136.1
1A6Y177BPRO-68.1-136.2
1A6Y178BLYS-162.6360.0
sould be :
File sesudah.txt
1A6YB173PHE-75.1167.5
1A6YB174GLY58.7155.7
1A6YB175ARG-18.1142.6
1A6YB176ILE-72.6136.1
1A6YB177PRO-68.1-136.2
1A6YB178LYS-162.6360.0
you can do it with this script
cat sebelum.txt awk 'BEGIN { FS=""; OFS="" } {$a=$2 $2=$3; $3=$a; print $0 } ' >> sesudah.txt
Note :
FS = Field Sparator
OFS = Output Field Sparator
Monday, September 7, 2009
swap columns and replace
Labels: shell script
Posted by joe is my nick name at 8:16 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment