Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- TITLE="Select One"
- MENU="Make a Choice"
- url="http://www.aniprop.com/wp-content/uploads/2017/04/"
- mapfile -t urls < <(lynx --dump "$url" |grep "Death-Note"|grep " http"|awk '{print $2}')
- function getList(){
- # printf "%s\n" "${urls[@]}"|while read line
- # do
- # echo "\"$(basename "$line")\" \"-\""
- # done
- for (( i=0; i<${#urls[@]}; i++ ));
- do
- echo "$i \"$(basename ${urls[i]})\"";
- done
- }
- s="$(whiptail --title "$TITLE" --menu "MENU" 16 100 9 $(getList) 3>&2 2>&1 1>&3)"
- echo "${urls[s]}"
- #wget "${urls[s]}"
- mpv "${urls[s]}"
Add Comment
Please, Sign In to add comment