User Tools

Site Tools


sed:count_lines_in_a_file

This is an old revision of the document!


SED - Count - Count lines in a file

sed -n '$=' filename

Example

Running that command again this file:

testfile
aaa
bbb
ccc

returns:

3
sed/count_lines_in_a_file.1597575924.txt.gz · Last modified: 2020/08/16 11:05 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki