Sunday, January 15, 2012

awk , add column to file

Add column with line number to file:

awk '{print NR"\t"$0}' degrees_dir > degrees_dir_order

After:

head degrees_dir_order
1 669
2 667
3 600
4 596
5 580
6 549
7 490
8 460
9 454
10 447

No comments:

Post a Comment