Skip to content

Instantly share code, notes, and snippets.

@so77id
Last active March 25, 2020 05:04
Show Gist options
  • Select an option

  • Save so77id/fa4c5360d1efc9645d80a7ca8882e423 to your computer and use it in GitHub Desktop.

Select an option

Save so77id/fa4c5360d1efc9645d80a7ca8882e423 to your computer and use it in GitHub Desktop.
used in naxnet code review
if [ "$#" -eq 0 ]; then
myArray=( )
else
urls=( $1 )
names=( $2 )
src=$3
fi
for ((i=0;i<${#urls[@]};++i)); do
name=$(echo ${names[i]} | sed 's/"//g')
url=$(echo ${urls[i]} | sed 's/"//g')
wget -O ${src}/${name} ${url}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment