Advertisement
metalx1000

Medical Supply Orders BASH/Shell Script

Nov 2nd, 2021
2,007
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. url="https://filmsbykris.com/scripts/2022/medlist"
  4. submit="$url/submit.php"
  5. stations="$url/stations.php"
  6. names="$url/names.php"
  7. items="$url/medical_items.php"
  8.  
  9. station="$(wget -qO- "$stations"|fzf --prompt "Select a Station: ")"
  10. name="$(wget -qO- "$names"|sort|fzf --prompt "Select Your Name: ")"
  11. items="$(wget -qO- "$items")"
  12.  
  13. while [ 1 ]
  14. do
  15.   item="$((echo -e "QUIT\n$items")|fzf --prompt "Select An Item to Order: ")"
  16.   [[ "$item" == "QUIT" ]] && break
  17.  
  18.   qty="$(echo {0..100}|tr " " "\n"|fzf --prompt "How Many: ")"
  19.  
  20.   wget -qO- "$submit?station=$station&name=$name&item=$item&qty=$qty"
  21.   echo ""
  22.   sleep 1
  23. done
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement