Hello, fellow computer junkies. First time poster! My boss wrote an application (Mavericks 10.9, Mountain Lion 10.8) that checks a user's security settings. The user runs the application, then it spits out an email that is sent back to our inbox showing the results. On our end, we have a mail rule setup which sorts all of those results messages into a local mailbox. The email body looks something like this:
I am writing a script that will help me manage these emails. The goal is to run the script and have it spit out who has passed and who has failed into a simple spreadsheet. The identifiers can be the PASS or FAIL status in the message. Basically, if it says FAIL in the message I want it sorted to the "Fail" Column on the spreadsheet. If it does not contain FAIL, it can sort to the Pass column of the spreadsheet
I've STARTED with the code below but it does't work on files that have spaces in the name. It does, however, work on files with no spaces in the name. My train of thought is sort the messages between pass and fail, then output the email address to a spreadsheet appropriately. Anyways, any help is greatly appreciated! Assume I am a N00B
This helps me with my first step, thank you. Can you explain the characters used?
I'm trying to make sense of the "t" and "OK" used. I understand the rest.
\t is a TAB character \n is a New Line, so we are creating a file for import into a sheet with 3 TAB separated columns filename,fail and pass. Probably should have used PASS instead of OK as this is what you mentioned in your first post.
This User Gave Thanks to Chubler_XL For This Post:
I am writing a bash script that will find all references to the “Well_List” in the “Comp_File”.
I am filtering a Well_List that contains the following:
TEST_WELL_01
TEST_WELL_02
TEST_WELL_11
TEST_WELL_22
GOV_WELL_1
GOV_WELL_201
PUB_WELL_57
PUB_WELL_82
.
.
Comparison... (5 Replies)
I'm scanning a list of emails- I need to pull 2 pieces of data, then move to the next file:
Sender's Email Address
Email Date
I need these to be outputted into a single column- separated by a ",". Like this:
Email1's Address, Email1's Date Stamp
Email2's Address, Email2's Date Stamp... (4 Replies)
Hi there, Please could anyone help with this.
I have an xml file that contains repeating values eg
<Rule name> AAAAA
<Action> BBBBB
</Action>
<Data> CCCCC
</Data>
<Type> DDDDD
</Type>
</Rule name>
<Rule name> A1A1A1A1
<Action> B1B1B1B1
</Action>
<Data> C1C1C1C
</Data>
<Type>... (4 Replies)
Hi guys. Very new to this so apologies if this is ridiculously obvious, but I am not sure why this isn't working. I want to pull a file off an FTP server. I currently do it through windows, which is no problem, but I want to move everything to a Linux box I just installed. wget won't work as the... (4 Replies)
Good day Gurus,
I have a csv file that contains an inventory of active servers. This csv file contains a well over a hundred systems (IBM, SUN, HP). It also contains those systems details. See below for an example
hostA,invver,1.02,20100430
hostA,date,08/30/2010,06:18
hostA,use,"Unknown... (4 Replies)
I have a variable embedded in a long string called "commands" coming in on a query_string. I need to copy the string to a file with the variable $loop1 converted before it writes. Right now, it writes the varible itself instead of what it should be.
QUERY_STRING... (2 Replies)
Hi all,
I have the following script, but are not too sure about the syntax to complete the script.
In essence, the script must connect to a SFTP server at a client site with username and password located in a file on my server.
Then change to the appropriate directory.
Pull the data to the... (1 Reply)
I saw a few posts close to what i want to do, but they didn't look like they would work exactly.. or I need to think out of the box on this.
I have a file that I keep server stats in for my own performance analysis. this file has the output from many commands in it (uptime, vmstats, ps, swap... (2 Replies)