This file contains 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 characters
#!/bin/bash | |
function process_link() { | |
local LINK FILE_URL FILE_URLS FILENAME | |
LINK=$1 | |
FILE_URLS=$(curl -s https://kccna18.sched.com${LINK} | grep "file-uploaded" | cut -d\" -f 4) | |
for FILE_URL in $FILE_URLS; do | |
FILENAME=${LINK#https:*} | |
FILENAME="${FILENAME##/*/}.${FILE_URL##*.}" | |
echo "Downloading $FILENAME" >&2 |