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

Like it.? Share it:

Comments are closed.