[sf-lug] SF-LUG meeting notes for Sunday June 2, 2019

Akkana Peck akkana at shallowsky.com
Tue Jun 4 08:45:25 PDT 2019


Rick Moen writes:
> Quoting Alex Kleider (akleider at sonic.net):
> 
> > I tried your script:
> 
> Short version:  It turns out I assumed GNU awk, but failed to say so.

How's this? (Add to your .bashrc or wherever.)

dayofweek() {
    echo -n "Date as YYYY-MM-DD: "
    read d
    date --date=$d
}

If you really only want the day, change the last line to

    date --date=$d +%a

        ...Akkana



More information about the sf-lug mailing list