playing with cat and awk

cat can print out line number and awk lets you format it. This combo is excellent to manipulate files

creating a csv for eg.

cat -n phpbook.csv | awk '{print $2","$1}' > phpbook1.csv

Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.