Re: Finding all e-mail addresses in files on server.
From: Bit Twister (BitTwister_at_mouse-potato.com)
Date: 04/04/05
- Previous message: ifoutch_at_gmail.com: "Re: Finding all e-mail addresses in files on server."
- In reply to: ifoutch_at_gmail.com: "Re: Finding all e-mail addresses in files on server."
- Next in thread: c0ldbyte: "Re: Finding all e-mail addresses in files on server."
- Reply: c0ldbyte: "Re: Finding all e-mail addresses in files on server."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 04 Apr 2005 01:14:58 -0500
On 3 Apr 2005 22:29:18 -0700, ifoutch@gmail.com wrote:
> Thank you BT and CJ... Actually Chris has offered extremely useful
> solutions to a few of my previous posts in the past and I've much
> appreciated it.
Yes Chris does help alot of people.
> I ended up an SA because I showed some abilties with my shell scripting
> while working as a NOC operator. Unfortunately without any previous
> experience, schooling or training. The job is not as easy I would like.
Been there done that.
> Every task I get I have to learn it as I go and much of that ends up
> during the evening on my own time.
Yes, I have take home lots of work or dialed in after getting home.
> This task sounds easy enough except that it gets messy really quick and
> I dislike messy scripts.
I find pushing the acutal work as far down into a subroutine/funmction helps on
messy stuff.
> I can figure out how to use grep, find, sed, xargs, awk, cut and
> whatever else need. What I am looking for is pointers in the "best"
> way to do this and any advice on what I might likely overlook.
>From what you have described, I would have created the list of files
to munge. Look at the lines to be munged, and see if a small
function/subroutine can make the changes.
Then use a loop to read the list to process files into a tmp workspace
and check the results. If they are valid, backup the production
scripts into a fallback directory, and install the new ones. If
production throws up, run the fallback script to copy fallback scripts
back into production.
No way would I run a script to mass update a bunch of scripts on a
production box with my fingers crossed.
> People have much nicer manners when they are face to face and they
> need to be concerned about the condition of such after an exchange.
Never let anyone's post bother you. Watch them for awhile to see if
they are worth your time, kill file them if they are of no use.
Anytime I run into a mess/problem like yours, I'll put the variable
element into a config file, source it in a script, and use a variable in the
scripts.
As an application programmer, I put lots of tests in my scripts to
verify nodes I need, database listners, mount points
needed by my app were realy there. When a check failed, it would
create a message file, and call the nofity funcition with who to
contact, subject, filename of problem description.
Example email variable names: $dba, $sysops, $crash, $coder, $mgr,
$sysadmin, $fyi...
Notify function would then add in node, time, script name, application
and call mailx -s "$2" $1 < $3
That reduced the O dark thirty calls to me when my production scripts
aborted because of external failures.
Also allowed me to run the scripts on the development and test
bed systems without bothering the production group by changing names
in my config file.
- Previous message: ifoutch_at_gmail.com: "Re: Finding all e-mail addresses in files on server."
- In reply to: ifoutch_at_gmail.com: "Re: Finding all e-mail addresses in files on server."
- Next in thread: c0ldbyte: "Re: Finding all e-mail addresses in files on server."
- Reply: c0ldbyte: "Re: Finding all e-mail addresses in files on server."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|