From: Andrew Lorimer Date: Tue, 19 Nov 2019 06:12:40 +0000 (+1100) Subject: Merge branch 'master' of charles:/tank/andrew/code/scripts X-Git-Url: https://git.lorimer.id.au/scripts.git/diff_plain/6c15104e95fb712a90e96280be764d39c671a23a?hp=064c0b794d094a455ca648bfebfd098bf64e3db2 Merge branch 'master' of charles:/tank/andrew/code/scripts --- diff --git a/nameget.sh b/nameget.sh index 43016da..bb3d2a1 100755 --- a/nameget.sh +++ b/nameget.sh @@ -27,7 +27,7 @@ Get a list of urls and optional corresponding output paths, then send them to wg \e[1mOPTIONS:\e[0m -l, --list - Text file where each line contains a url and filename separated by a space. Filename is optional. + Text file where each line contains a url and filename separated by a space. Filename is optional. Lines starting with # are ignored. Default: ./queue.txt -h, --help @@ -127,6 +127,9 @@ output "Starting downloading files in $(readlink -f $list) to $outdir" "\n\e[1m" while read -r url filename; do + # Ignore if line is commented + [[ "$url" =~ ^\s*#.* ]] && continue + # parse output filename destarg='' # placeholder for -O argument (output filename) if [ -z "$filename" ] || [ "filename" = "" ]; then