Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ $# -ne 2 ]; then
- echo "Usage $0 <input_file> <output_file>"
- exit 1
- fi
- regex='^https*:\/\/[a-zA-Z0-9\.\-]+[(.com)|(.ro)|(.eu)];([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$'
- > $2
- while IFS= read -r line; do
- if [[ $line =~ $regex ]]; then
- echo "OK" >> $2;
- else
- echo "ERROR" >> $2;
- fi
- done < $1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement