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
net share system error 5 acces denied
Moving .piv and .stm Exchange 2003 files to another drive
What do you think about these specs for a new System Center Operations/Configurations Manager 2007 R2 server?
IBM Think Pad HD error
CRM 4.0 - Contracts Expiring at a specific time?
How to sync iphone 3.1.3 with exchange server 2003
VMware Workstation 7.1 Won't Install
Cisco VPN Client 5.0.07.0290 on Windows 7 64 bit
Serialize ajax requests with jQuery
Does OpenOffice allow Windows 7 preview pane to preview .doc and .xls files?