SHARE
TWEET

Untitled

a guest Oct 10th, 2019 83 in 175 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. online=()
  4. offline=()
  5.  
  6. while read line; do
  7.     if curl -Ls "$line" &> /dev/null; then
  8.         online+=("$line")
  9.     else
  10.         offline+=("$line")
  11.     fi
  12. done < "$1"
  13.  
  14. printf "%s\n" "${online[@]}" > online.txt
  15. printf "%s\n" "${offline[@]}" > offline.txt
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top