I have a bunch of URL in a text file. As Firefox seems unable to load these URL directly, I must convert them to HTML.
sed doesn't work:
sed -e 's/^(.*)$/<a href="\1">\1<\/a><br>/g' myfile.txt
Error message returned (translated, it may not look exactly so on english systems):
sed: -e expression n°1, char 33: invalid reference \1 in right side of the command `s'
I simply wonder why?
URLs are like so:
some may contain these char: % & / \ _ - = :
And it seems I got a "linebreak" char at the end of the line, before the real line break, so included in the .* statement. It should be because the file was created under a Windows environment.