[ale] Bash script help

Greg Freemyer greg.freemyer at gmail.com
Wed Mar 12 15:13:34 EDT 2008


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.

Greg

On Wed, Mar 12, 2008 at 1:18 PM, Geoffrey <lists at serioustechnology.com> wrote:
> Okay, I couldn't let it go:
>
>  value=$(awk -F ':' '/root/ {print ($3 + 1) * 86400 }' /etc/shadow)
>  date -d @${value} +"%B %d %G"
>
>
>
>  Doctor Who wrote:
>  > I'm trying to return the value of when the last time the root password
>  > was changed.  The script would do something like:
>  >
>  > 1) more /etc/shadow | grep root | awk -F: '{print $3}'
>  > 2) Take above value and add 1
>  > 3) Multiple the result by 86400
>  > 4) Substitute the value above after the @ below
>  > 5) date -d @XXXX +"%B %d %G"
>  > 6) Give me the output value of this
>  >
>  > I would like to keep this done using bash.  Any help appreciated.
>  > _______________________________________________
>  > Ale mailing list
>  > Ale at ale.org
>  > http://mail.ale.org/mailman/listinfo/ale
>  >
>
>
>  --
>  Until later, Geoffrey
>
>  Those who would give up essential Liberty, to purchase a little
>  temporary Safety, deserve neither Liberty nor Safety.
>   - Benjamin Franklin
>  _______________________________________________
>  Ale mailing list
>  Ale at ale.org
>  http://mail.ale.org/mailman/listinfo/ale
>



-- 
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com


More information about the Ale mailing list