Here my very basic script
I have a list filled with random URLs
I need to place each URL in separate txt file with name contains the same URL (I know about filesystem limitation)
So I need to replace slashes with underscore
#This script create a multiple txt files with names and contents, which imported from file with URLs
#echo "Usage url2txt.sh < filename_with_URL.stxt"
while read line ; do
echo $line > 1.txt;
sed 's/\//_/g' $line > $line;
mv 1.txt $line.txt
But i stuck with sed.
If I manual sanitize file with URL - all works. File created, sanitized URL placed into file, but i need unsanitized URL in file :)