Extract email addresses from text file using regex with bash or command line

后端 未结 4 1337
误落风尘
误落风尘 2020-12-15 08:32

How can I grep out only the email address using a regex from a file with multiple lines similar to this. (a sql dump to be precise)

Unfortunately I cannot just go b

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-15 09:06

    If you know the field position then it is much easier with awk or cut:

    awk -F ',' '{print $7}' file
    

    OR

    cut -d ',' -f7 file
    

提交回复
热议问题