download_NVblogtext.sh 791 B

1234567891011121314151617181920212223
  1. # Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
  2. #!/usr/bin/env bash
  3. # gdrive_download
  4. # script to download Google Drive files from command line
  5. # not guaranteed to work indefinitely
  6. # taken from Stack Overflow answer:
  7. # http://stackoverflow.com/a/38937732/7002068
  8. gURL=https://drive.google.com/file/d/1PpyVSvRGoja6M2dbVpiscxrZD3YupRgT/view?usp=sharing
  9. # match more than 26 word characters
  10. ggID=$(echo "$gURL" | egrep -o '(\w|-){26,}')
  11. ggURL='https://drive.google.com/uc?export=download'
  12. curl -sc /tmp/gcokie "${ggURL}&id=${ggID}" >/dev/null
  13. getcode="$(awk '/_warning_/ {print $NF}' /tmp/gcokie)"
  14. cmd='curl --insecure -C - -LOJb /tmp/gcokie "${ggURL}&confirm=${getcode}&id=${ggID}"'
  15. echo -e "Downloading from "$gURL"...\n"
  16. eval $cmd
  17. mv extractedNVblogs.txt ../dataset/EN/