Skip to content

Instantly share code, notes, and snippets.

@amit-chahar
Last active February 20, 2023 12:57
Show Gist options
  • Select an option

  • Save amit-chahar/db49ce64f46367325293e4cce13d2424 to your computer and use it in GitHub Desktop.

Select an option

Save amit-chahar/db49ce64f46367325293e4cce13d2424 to your computer and use it in GitHub Desktop.

Revisions

  1. amit-chahar revised this gist Mar 23, 2018. No changes.
  2. amit-chahar created this gist Mar 23, 2018.
    5 changes: 5 additions & 0 deletions download-script.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/bin/bash
    fileid="FILEIDENTIFIER"
    filename="FILENAME"
    curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
    curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}