grep tricks
Exclude value from file
IP address regex
Domain from emails
cat 1.txt
Hello [email protected] line1 value
Buy [email protected] line 2 stringX
grep -o '@[^ ]*' 1.txt | tr -d @
ddd.com
ftwr22.net
Any symbols in line before space
Exclude value from file
IP address regex
Domain from emails
cat 1.txt
Hello [email protected] line1 value
Buy [email protected] line 2 stringX
grep -o '@[^ ]*' 1.txt | tr -d @
ddd.com
ftwr22.net
Any symbols in line before space