Microsoft
Software
Hardware
Network
Question : Linux string manipulation.
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 “no.reply+something+thisst
ring@domai
n.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.
Answer : Linux string manipulation.
grep "no.reply+" filename | cut -d "+" -f 3|cut -d "@" -f 1
That will cut again at the @ sign and return the first field. thisstring.
Random Solutions
mcafee EPO script to remove agent and virusscan
Oracle SQL Developer -- double click to open TABLE ?
Is it possible to apply style, such as bold or color, to a single line in TMemo1 control?
Quoting array names in Associative Arrays in PHP in assignment and echo statements.
Public Folder "Pretty" names not showing up in GAL
SWF object with FLVPlayback component
Insert into MySQL Table from MSSQL Insert Trigger
How to upgrade RAM on a Server 2003 Standard SP2
Shell Script
Need help with Syntax - DnsAvoidRegisterRecords