Is there a way I can trigger a wget
command via bash script and continue to the next command in the bash script without waiting for a response from the wget
? i am executing a command which should take lots of time and don't want wget to hold for a response nor re-trigger it after timeout has been timeout limit
You should use the --background
option, as it goes to background and saves the output to a log
--background
Go to background immediately after startup. If no output file is specified via the -o, output is redirected to wget-log
Example:
$ wget http://cdimage.ubuntu.com/ubuntu-server/daily/current/wily-server-ppc64el.iso --background
Continuing in background, pid 79783.
Output will be written to ‘wget-log’.
$ cat wget-log
--2015-05-12 11:21:35-- http://cdimage.ubuntu.com/ubuntu-server/daily/current/wily-server-ppc64el.iso
Resolving cdimage.ubuntu.com (cdimage.ubuntu.com)... 91.189.92.164, 2001:67c:1360:8c01::1f
Connecting to cdimage.ubuntu.com (cdimage.ubuntu.com)|91.189.92.164|:80... connected.
....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With