[ale] Bash script help
Jeff Lightner
jlightner at water.com
Fri Mar 14 11:45:59 EDT 2008
For Bash kung fu you should let the process attack then defeat it with
its own resident stack size...
-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
Doctor Who
Sent: Wednesday, March 12, 2008 5:09 PM
To: ale at ale.org
Subject: Re: [ale] Bash script help
On 3/12/08, Mike Fletcher <fletch at phydeaux.org> wrote:
> Geoffrey wrote:
> > Greg Freemyer wrote:
> >
> >> Now the poor student has to simplify that down to something the
> >> teacher will believe he wrote.
> >>
> >> May be easier just to do it from the other helpful hints.
> >>
> >
> > I thought that was simpler. I broke that down from the one liner:
> >
> > date -d @$(awk -F ':' '/root/ {print ($3 + 1) * 86400 }'
/etc/shadow) \
> > +"%B %d %G
> >
> >
> Fore!
>
> perl -MPOSIX -F: -lane '/^root:/&&print strftime("%B %d
> %G",localtime(($F[2]+1)*86400))' /etc/shadow
>
> ruby -F: -lane 'if/^root:/;puts
> Time.at(($F[2].to_i+1)*86400).strftime("%B %d %G");end' /etc/shadow
>
>
>
Thanks again for all the input...not that it matters, I guess, but to
put everyone's mind at ease this was not 'homework.' I stopped that
quite a ways back. Someone asked me for help with this (also not
homework) and I knew how to get most of the way there, but my bash
kung-fu is not that strong and I needed a little help.
I learned a good bit thanks to some of the replies. Thanks again!
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------
More information about the Ale
mailing list