User Tools

Site Tools


awk:number_all_lines_in_a_file

AWK - Number all lines in a file

awk '{ print NR "\t" $0 }' file.txt

Number lines in a fancy manner

awk '{ printf("%5d : %s\n", NR, $0) }' file.txt
awk/number_all_lines_in_a_file.txt · Last modified: 2020/09/23 16:04 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki