Skip to main content
Awk, sort and friends

Najmi@Najmi ~
$ cat fileasal.txt
#436 UMKC
#446 Charlotte
#353 QUT
#325 Kent State
#259 Missippi State
#278 VCU
#202 Wayne State
#100 U New Mexico
#27 Indiana University
#1003 Missouri University of Science and Technology
#265 University of Idaho


Najmi@Najmi ~
$ awk -F# {'print $1,$2'} fileasal.txt
436 UMKC
446 Charlotte
353 QUT
325 Kent State
259 Missippi State
278 VCU
202 Wayne State
100 U New Mexico
27 Indiana University
1003 Missouri University of Science and Technology
265 University of Idaho


Najmi@Najmi ~
$ awk -F# {'print $1,$2'} fileasal.txt |sort -n

27 Indiana University
100 U New Mexico
202 Wayne State
259 Missippi State
265 University of Idaho
278 VCU
325 Kent State
353 QUT
436 UMKC
446 Charlotte
1003 Missouri University of Science and Technology

Comments

Popular posts from this blog

Gue dengan S2 gue. Sronok banget!
Beijing and image manipulation addict Salam, Image manipulation with command line is fun and time consuming too. Given my Digikam plugins unable to work, I start to figure out many wonderful features of other tool which offer almost the same quality. However I was stucked with ImageMagick,with many tutorial on the net: Here and Here for i in *jpg ;do convert -font helvetica -fill white -pointsize 18 -draw 'text 10,50 "ACM-ICPC Beijing 2005"' $i $i;done The pix above shows a heater to heat up guest room during ACM-ICPC competition. (outside building's temperature is almost 4 celcious).