I am looking for a Linux command or script that retrieves a particular string from a file and write it to another file.
The file to be searched is a log file that may contain e-mail addresses in the following format “email@example.com”
I need to retrieve "thisstring" wherever found and write it to another file.
My approach was to search for “no.reply+” substring using grep command and then use another command that retrieves the string between the second + sign and the @ sign, but I need help writhing the complete command.
Any help is appreciating it.
Thanks in advance.