1

I have command that executed when script over and download file from list. I use Termux on android and it say you can't use cd while running script.

    xargs -n 1 curl -O -C - <url

But it download all file to folder where I runned this script. How I can change output directory.

PS: Only curl please. Aria2c and wget will ignored by me.

Yusifx1
  • 101
  • 1
  • 9
  • Does this answer your question? [Save file to specific folder with curl command](https://stackoverflow.com/questions/16362402/save-file-to-specific-folder-with-curl-command) – franklinsijo Apr 13 '20 at 19:11

1 Answers1

1

Okay. This script I use now

         while read url
        do
        curl --create-dirs -o "$file path/name" $url

I use "basename" of url for name. Please answer if you have better code.

Yusifx1
  • 101
  • 1
  • 9