blob: b02f5ff7c5cddb66c85747c0e1845b853b70e081 (
plain) (
tree)
|
|
#!/usr/bin/bash
# while IFS= read -r line; do
# echo "$line" | grep -Eo "^(\([0-9]{3}\)\s|[0-9]{3}-)[0-9]{3}-[0-9]{4}$"
# done < ./file.txt
grep -e "^[0-9]\{3\}\-[0-9]\{3\}\-[0-9]\{4\}$" -e "^([0-9]\{3\}) [0-9]\{3\}\-[0-9]\{4\}$" file.txt
|