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
SQL 2008 upgrade creates two separate instances
Exchange 2007 OWA causes 2 audit failures on failed login attempt
jQuery Chained Select Boxes - Three Tiered ( third tier selected )
Server 2008 NLB problem
Ways to merge files in linux
VB.Net 2010: ResourceManager.GetObject fails with silent exception on x64
Spool problem in sqlplus
How to show the progress of record submission to the database dynamically in JSP
Could Linkserver provide me DB schema?
Upgrading from Windows 7 Home Ultimate to a professional version - how?