I\'m trying to knock together a little batch script for downloading files, that takes a URL as its first parameter and a local filename as its second parameter. In testing
if $2 is a text input then try
$2
echo $2 | sed 's: :\\\ :g '
I generally avoid backslashes in sed delimiters are they are quite confusing.