Bash script for downloading files with Curl

后端 未结 4 1748
挽巷
挽巷 2021-01-13 15:47

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

4条回答
  •  有刺的猬
    2021-01-13 16:23

    if $2 is a text input then try

    echo $2 | sed 's: :\\\ :g '
    

    I generally avoid backslashes in sed delimiters are they are quite confusing.

提交回复
热议问题