Page tree
Skip to end of metadata
Go to start of metadata

The "@" symbol actually creates a lot of headaches in scripting.

Script,

#!/bin/bash

perl -p -i -e "s/\@gmail.com/000/g" in.txt
perl -p -i -e "s/\@google.com/000/g" in.txt
perl -p -i -e "s/\@hotmail.com/000/g" in.txt
perl -p -i -e "s/\@rogers.com/000/g" in.txt

grep "\@" in.txt  | wc -l

Input File,

clark.kent@rogers.com, clark.kent@gmail.com
lois.lane@rogers.com
perry.white@spam.org, jimmy.olsen@gmail.com, lois.lane@gmail.com

  • No labels