Could anybody help me.
I need to create a script that reads a text file from STDIN and prints out the file to STDOUT with line numbers at the beginning of each line.
Thanks.
Could anybody help me.
I need to create a script that reads a text file from STDIN and prints out the file to STDOUT with line numbers at the beginning of each line.
Thanks.
How do I run this on the Unix Terminal?
# count lines (emulates "wc -l")
sed -n '$='
You can also do :
cat -n /path/to/file
Jean-Pierre.
In The terminal. It shows that I do not have a file or directory with that name.
cat -n /path/to/file
Thanks for any help you could give me.
/path/to/file is an example file name not a real file name
A complete filename (example, not real) is /home/mascorro/text.lis
The path is /home/mascorro
the file is named text.lis
Plus vgersh99 gave you the answer
nl <filename of your choice goes here>