Write a command to find the length of a line in a file?

The below command can be used to get a line from a file.
sed –n ‘<n> p’ filename
We will see how to find the length of 10th line in a file
sed -n ’10 p’ filename|wc -c

Be the first to comment

Leave a Reply

Your email address will not be published.


*