I want to print number of lines in a file using the sed command. I have the following line for that, please can any one explain in detail.sed -n '$=' myfile.txt
sed command with option -n and '$='
sed
If you get some command that works but you don't understand the options use man command to get more information about the options used. man sed will show you (if you scroll/search through the output):   -n, --quiet, --silent          suppress automatic printing of pattern spaceand   =      Print the current line number.and (searching for $ can be done by prefixing it with a backslash \):   $      Match the last line.So it gives you the line number of the last line, without additionally printing the matching line (the last line) found, which would be the default.