fork download
  1. #!/bin/bash
  2. SOURCE="8.8.8.8"
  3. RX="^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(/[0-9]{1,2})?$"
  4. if ! [[ $SOURCE =~ $RX ]];then
  5. echo ERROR: Invalid Source
  6. exit 1
  7. fi
Success #stdin #stdout 0s 19688KB
stdin
Standard input is empty
stdout
Standard output is empty