IMHO, "grep TERM hairy_big_log_file.log | grep -v term2 | less" is a script
in that it condenses 3 distinct commands into one operation.

OTOH, i think you may want to keep looking... at least for someone within
the ops center who's motivated to up their skills.

________________________________________
Joe Shisei Niski
Portland, Oregon, USA
至誠


On Tue, Jan 21, 2014 at 1:52 PM, Michael Rasmussen <[email protected]>wrote:

> Michael Rasmussen wrote:
> >
> > A call for opinion, or a pseudo poll.
> >
> > Consider someone at the command line,  needs some information, decides
> to:
> >
> > me@server $  for S in `cat list_of_servers`;do echo "  $S"; ssh $S
> > 'command'; done
> >
> > In your mind is that scripting?
>
> There were a couple of calls for context.  We're sending some of our
> drudge work to an operations center.  I've been asked to provide a set of
> commands I typically use so they can replicate that aspect of my work.
>
> Faced with the prospect of sshing to X number of servers to run a command
> my habit is to rattle off a one liner for loop like that. If the command
> output is short enough I'll start with echo "$S  " and end up with a nice
> little table for easy review.
>
> When probing the *nix experience of the people who will be doing the work
> this Q&A came up. We had agreed they can diff, grep, df, du and stuff like
> that.  Then:
>
> ME:  Back to the Unix question - for loops?  as in :  for Server in `cat
> list_of_servers`; do echo $Server; ssh $Server 'some command'; done
>
> THEM: Nope, as of now we don't have knowledge on scripting and if ...
>
> And so I asked here.
>
> And now I'm wondering if:
>
> grep TERM hairy_big_log_file.log | grep -v term2 | less
>
> is called scripting
>
> Though I will accept that
>
> grep TERM humongous_file.log | grep ^2014 | cut -d: -f 1 | uniq -c
>
> does fit.
>
> and yes
>
> egrep "^2014.*TERM" ...
>
> is in the vocabulary.
>
>
> --
>     Michael Rasmussen
>   Be Appropriate && Follow Your Curiosity
>
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to