I have a text file which contains thousands of lines with same links. I want append the line number at the end of each line. For example;
https://example.com/
https://example.com/
these links would become:
https://example.com/1
https://example.com/2
and so on. I tried using the following code:
sed -n 'p;=' file | paste -d":" - -
However, it printed all the lines of the text file and the line number in the terminal in the following manner:
https://example.com/:1
https://example.com/:2