I have a file with links like this:
http://domain.com/file_name1.mkv
http://domain.com/file_name2.mkv
http://domain.com/file_name3.mkv
... and so on.
I want to create a file for each link with extension .strm and each file to have the name of the file name and to contain the link for that file. So, for the first link the first file name will be file_name1.strm and contain the first link, for the second link the file name will be file_name2.strm and will contain the second link, and so on. How can i do that?
I have a command that is doing something close but it creates only files with the names from words in a file:
sed -e 's/$/.strm/' file | xargs -d '\n' touch