I need to extract the mailid's from the mail.info file, for only the senders who send an email to eg "info@example.com".
To simple grep on the "info@example.com" mailaddress doesn't work because the "from=<$sender>" isn't listed in that grep command.
So I thought to grep on mailid's so I have all the mailid of a given time, then filter the mailid's who are equal to the mailid of the "to=<info@example.com>" section. Then i can filter the $senders emailaddresses. In theory...this should work, but how to translate this in a bash script?
example:
Above is example filtered mail.info file. In this example mail is send from "testvw02@brab2008.local" to "testhk03@brab2008.local". These have the same ID.
I need $1 and $2 of the MailID's only who have send to "testhk03@brab2008.local".
Thus the line 79A62442AF testvw02@brab2008.local.
Hope someone can help me with this.
Thanks in advanced!
Kind regards,
Roland
---------- Post updated at 09:21 AM ---------- Previous update was at 01:09 AM ----------
Have done scripting today, but still have an issue.
I have a file with only the mailid's and the senders emailaddresses. Mow I want to cat that file and remove only the lines which do not have a double entry in the first column.
Hi,
I have one script in my cronjob, which is fetching file from a ftp site and making a copy with today's date and time. This is a new setup. There was a instance when test_bill.txt was not present on ftp.xxxx_xxxx.com and when this job ran and did not fetched file, still it send mail of... (5 Replies)
Hi,
I do have an R script named KO.R. Basically reads thousands of files, whose name has a pattern that differs at a portion of the file name, List.txt.
Row_file1_mile.txt
Row_file2_mile.txt
Row_file3_mile.txt
...
...
Row_file1000_mile.txt
Below is a portion of my Rscript that reads... (4 Replies)
Hi,
I'm having trouble with a script to copy one line out of multiple files in a directory and copy to a file called test. I've tried the code below but it copies one line out of the first file multiple times not one line out of all the files. Would someone help? I'm very new to all this.
... (8 Replies)
Hi fellas,
I have a file that contains text something like this
SNAPSHOT snap-021ede4a vol-bc3f89c0 completed 2012-11-19T06:05:26+0000 100% 170495546006 850 Created by CreateImage(i-6adc0515) for ami-977dfafe from vol-bc3f89c0
TAG snapshot snap-021ede4a project PAC
TAG snapshot... (5 Replies)
Good afternoon!
I have a script in cron that runs every ten minutes. Normally it only takes a minute or so to complete. However there are times when the amount of data it is looking at is large, and it has taken 20 minutes.
So I want for it to look for the script before it starts.
I was... (8 Replies)
Hi all
I have a code in unix as
SCRNAME=`whence $0 | sed -e 's/\.\///g'`
this used to return me this path
/data/ds/dpr_ebicm_uat/etl/
but i ran this code in linux as
SCRNAME=`/bin/ksh whence $0 | sed -e 's/\.\///g'`
and now its returning me blank value in SCRNAME. I am not able... (2 Replies)
I run a command to extract blob file locations in a large log file to another file to remove all the fluff.
Example:
# tail -50 samtest|grep -i blob|cut -d "'" -f 2
/ASM/archive/20100311/18a7e13f.blob
/ASM/archive/20100312/18b5570b.blob
# cat outtest.log... (2 Replies)
Hi guys i have written a script which takes the options given to him and execute itself accordingly.
for example
if a script name is doctortux then executing doctortux without option should made doctortux to be executed in automatic mode i.e. doctortux -a
or if a doctortux is needed to run in... (4 Replies)
Hello !
I have a small problem on one of our servers - web server. From scripts (PHP and/or Perl) the domains cannot be solved to an IP address. From console everything works fine but from any sort of script the domain name cannot be solved - no matter is that domain is hosted on the same... (6 Replies)