On Fri, 6 Sep 2024 00:06:41 +0200 Diego <darkspirit5000@gmail.com> wrote:
I see same when do use filename without a path. I think download.dpi needs a filename with one path-segment or more.
Send script v0.2 with a workarround (prefix "./" if there is not a "/" in filename)
That works. It might be nice to set a default download location, and also automatically get the filename from the url with basename. Also, if you want to make this portable so it works on other shells than just bash, you can do something like this to get the port number: echo $a | cut -f4- -d"'" | rev | cut -c 5- | rev There are probably other ways to do it using sed, etc. I attached a quick and probably incomplete example which incorporates these ideas :) Regards, Alex