Files
general-scripts-and-system-…/customscripts/download_file_list
T
2025-08-19 00:12:11 -06:00

16 lines
355 B
Bash

#!/bin/bash
if [ -z $1 -o ! -f "$2" ]; then
echo "Usage: $0 <output_directory> <file_list>"
echo "ExaMPLE: download_file_list Downloads to_download.txt"
exit 1
fi
if [ ! -d "$1" ]; then
echo "Output directory does not exist: $1 Creating"
mkdir "$1"
fi
cat "$2" | \
while read line; do
echo "curl -o \"$1/$(basename $line)\" \"$line\""
done