How to get line numbers in file through cat command
Cat command can be used for many purposes. But do you also know you can see the line numbers in files with the help of cat command. With this method it is easy to troubleshoot or this information is also useful while creating the bash script.
Use the given below command
With cat command use -n flag
cat -n filename
Below is the screenshot of example.