User Tools

Site Tools


awk:number_all_lines_in_a_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

awk:number_all_lines_in_a_file [2020/09/23 16:03] – created 192.168.1.1awk:number_all_lines_in_a_file [2020/09/23 16:04] (current) 192.168.1.1
Line 5: Line 5:
 </code> </code>
  
 +----
 +
 +===== Number lines in a fancy manner =====
 +
 +<code bash>
 +awk '{ printf("%5d : %s\n", NR, $0) }' file.txt
 +</code>
awk/number_all_lines_in_a_file.1600877024.txt.gz · Last modified: 2020/09/23 16:03 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki