答案1
这个怎么样?
echo -e John Stevenson Johnnyboy34 [email protected] 0320423\\n Mike Anderson AndersMike [email protected] 0234234 | sed -r -e 's/((\w|[.])+)@/@/g'
得出的结果是:
John Stevenson Johnnyboy34 @company.com 0320423
Mike Anderson AndersMike @mikeltd.foo 0234234