Hi, I've had some success at writing this script. I'm sure it's not the most graceful and it still needs some work, but, it's a good start. I've had to search quite a bit for things that I'm sure are fairly simple to do. I could use some help adding a bit of functionality that I need in the script.
So far I have the emails coming into a directory and a separate file is made for each one (getmail does this). This script goes through the directory and gets the info I need from the email and adds this to a calendar file(.ics). Right now I have it confined to a single test file until I can have it do everything it needs to do. Once I have it ready to use on all files that come, I'll add code for it to move the parsed email out and work through all the files in the directory until it's empty. The script checks a few line that are in the emails but aren't in the example I gave before.
Heres the script:
Why are you reversing the output of ls and then getting the last line instead of just getting the first?
Or:
Quote:
Why seven calls to awk instead of one?
I don't have time to rewrite the awk code at the momment, but use this for a model:
Quote:
Why all the unnecessary \ns and backslashes?
Quote:
This work well (mostly) and leaves me with a file that I can use with my calendar (I've decided against evolution). I say this works well because normally the email wil have only one line like this:
But sometimes there will be more than one, e.g.:
The script gets the job date, start and end time from this line and it works well when there is only one line. Sometimes (not too often) the job will be on multiple consecutive days. So this line will be repeated with a different date.
How can I have the script add an entry for each line (day)?
Hey Guyz Just need some help regarding this.I need to send an email(sendmail) to group of users, when ever the content in a file e.g abc.txt changes.We need to send the changed content in the email.We are using bash here.Thanks for your help Guyz
--CoolKid (1 Reply)
Hi,
I am writing a shell script to pull a file from a remote server (Let say its a windows based remote server). One of my criteria is to pull a file only if it is not empty.
We have done a similar script to push a file from our end to a remote server and before pushing it we check for the... (2 Replies)
Discussion started by: sashankkrk
2 Replies
3. Forum Support Area for Unregistered Users & Account Problems
below is an extract from my file and I am trying to use Awk and grep and a while loop to pull infomation from under neath "HBA WWN=".HBA WWN=" reoccurs all over the file but the 100000c.....number are unique and I want to be able to pull and reference specifi information under this header ever time... (2 Replies)
I am hoping to get some help with a script to pull certain fields from a log file.
User update (xx6xxx P) rpt (yy6yyy B) 2010/01/20 21:36:01.298
Remote client forward start streamid 85af 2010/01/20 21:36:01.307
rpt2 (ZZ6ZZZ G) rpt1 (YY6YYY B) urcall (CQCQCQ ) mycall (W1AW)
user... (5 Replies)
I have CSV file that contains data in the format as shown below:
ABC, 67, 56, 67, 78, 89, 76, 55
PDR, 85, 83, 83, 72, 82, 89, 83
MPG, 86, 53, 54, 65, 23, 54, 75
..
..
..
..
I want to create a script that will pull out the rows from the above sheet and paste it into another CSV file.... (12 Replies)
I am attempting to write a script that will pull out NTLM hashes from a text file that contains about 500,000 lines of data. Not all accounts contain hashes and I only need the ones that do contain hashes.
Here is a sample of what the data looks like:
There are thousands of other lines in... (6 Replies)
Hello All,
I need help writing a bash script that will run on 500 LINUX servers and do the following:
1. Capture the ipa_server name from /etc/sssd/sssd.conf on a list of 500 servers in the ipahosts file.
2. Write to a file outputing only server name and IPA server name.
Root ssh keys... (3 Replies)
I/m a beginner so be easy. I have text files that live on an AIX server. The files come in and I've been charged with writing a shell script to email out that pulls the first date, and the last date of the file. I need to load these 2 dates into 2 separate variables. I can figure out the variables,... (13 Replies)
Hi all,
I'm trying to write a script to recursively cd into my Git projects and pull them, and will later expand it to build my projects as well.
I'm having a bit of trouble with my current script, as I want to supply a command line argument to tell it which branch to check out. I can hard... (2 Replies)