Last active
December 17, 2020 21:18
-
-
Save abhishekkr/4165864 to your computer and use it in GitHub Desktop.
Revisions
-
abhishekkr revised this gist
Mar 25, 2013 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ # save the gist files at that URL in ~/Downloads/gists ## ddl_gist(){ if [ $# -ne 2 ]; then echo 'Failed. Syntax: $> ddl-gist GITHUB_GIST_URL DOWNLOAD_PATH' @@ -11,12 +11,13 @@ ddl-gist(){ gist_url=$1 download_path=$2 echo '[*] Getting all GIST File URLs from '$gist_url gists=`curl -ksL -H 'User-Agent: Mozilla/5.0' $gist_url | grep '<a\ .*href=".*/raw/' | sed 's/.*a\ .*href="//' | sed 's/".*//'` echo '[*] Downloading all files' for lines in `echo $gists | xargs -L1`; do if [ ! -z $lines ]; then echo $lines gistfile=`echo $lines | sed 's/.*\///'` save_as=$download_path"/"$gistfile echo "Downloading URL: https://gist.github.com"$lines -
abhishekkr revised this gist
Mar 25, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ # save the gist files at that URL in ~/Downloads/gists ## ddl-gist(){ if [ $# -ne 2 ]; then echo 'Failed. Syntax: $> ddl-gist GITHUB_GIST_URL DOWNLOAD_PATH' @@ -11,7 +11,7 @@ function ddl-gist(){ gist_url=$1 download_path=$2 echo '[*] Getting all GIST File URLs from '$gist_url gists=`curl -ksL -H 'User-Agent: Mozilla/5.0' $gist_url | grep '<a\ .*href="/raw/' | sed 's/.*a\ .*href="//' | sed 's/".*//'` echo '[*] Downloading all files' for lines in `echo $gists | xargs -L1`; do -
abhishekkr revised this gist
Dec 13, 2012 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,6 @@ function ddl-gist(){ gist_url=$1 download_path=$2 echo '[*] Getting all GIST File URLs from '$gist_url gists=`curl -ksL -H 'User-Agent: Mozilla/5.0' https://gist.github.com/3683955 | grep '<a\ .*href="/raw/' | sed 's/.*a\ .*href="//' | sed 's/".*//'` echo '[*] Downloading all files' for lines in `echo $gists | xargs -L1`; -
abhishekkr revised this gist
Dec 13, 2012 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,21 +7,22 @@ function ddl-gist(){ then echo 'Failed. Syntax: $> ddl-gist GITHUB_GIST_URL DOWNLOAD_PATH' return fi gist_url=$1 download_path=$2 echo '[*] Getting all GIST File URLs from '$gist_url #gists=`curl -ksL -H 'User-Agent: Mozilla/5.0' $gist_url | grep '<a\ .*href="/raw/' | sed 's/.*a\ href="//' | sed 's/">raw<\/a>.*//'` gists=`curl -ksL -H 'User-Agent: Mozilla/5.0' https://gist.github.com/3683955 | grep '<a\ .*href="/raw/' | sed 's/.*a\ .*href="//' | sed 's/".*//'` echo '[*] Downloading all files' for lines in `echo $gists | xargs -L1`; do if [ ! -z $lines ]; then gistfile=`echo $lines | sed 's/.*\///'` save_as=$download_path"/"$gistfile echo "Downloading URL: https://gist.github.com"$lines echo "to "$save_as"....." wget -c -O $save_as "https://gist.github.com"$lines fi done } -
abhishekkr created this gist
Nov 29, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ # Usage Example: $ ddl-gist 'https://gist.github.com/4137843' ~/Downloads/gists # save the gist files at that URL in ~/Downloads/gists ## function ddl-gist(){ if [ $# -ne 2 ]; then echo 'Failed. Syntax: $> ddl-gist GITHUB_GIST_URL DOWNLOAD_PATH' return fi gist_url=$1 download_path=$2 echo '[*] Getting all GIST File URLs from '$gist_url gists=`curl -ksL $gist_url | grep '<a\ href="/raw/' | sed 's/.*a\ href="//' | sed 's/">raw<\/a>.*//'` echo '[*] Downloading all files' for lines in `echo $gists | xargs -L1`; do if [ ! -z $lines ]; then gistfile=`echo $lines | sed 's/.*\///'` save_as=$download_path"/"$gistfile echo "Downloading URL: https://gist.github.com"$lines echo "to "$save_as"....." wget -c -O $save_as "https://gist.github.com"$lines fi done }