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

Alex Kleider akleider at sonic.net
Mon Jun 3 20:38:22 PDT 2019


On 2019-06-03 19:31, Rick Moen wrote:
> Quoting aaronco36 (aaronco36 at SDF.ORG):
> 
>> While I'm sure this snippet was just a test to see who is reading
>> this carefully, it turns out that the terminal command 'cal -B1 -1'
>> reveals that you (Bobbie) probably meant to write Monday _June_ 17
>> and _June_ 13 instead of the _May_ dates that you wrote above. See
>> 'man 1 cal' for further information about the nifty 'cal' command,
>> whether from SF, from the Peninsula, or from the wider East Bay area
>> surrounding the actual UC Berkeley campus...  LOL! ;->
> 
> /usr/bin/cal is definitely my kung-fu!  More at:
> http://linuxmafia.com/faq/Linux_PR/newlug.html  ('cal' is recommended
> strongly in item #12.)

I tried your script:

#!/bin/sh
echo "Type the future date in ISO 8601 (YYYY-MM-DD) format."
read futuredate
echo $futuredate | tr -s '-' ' ' | awk '{dt=mktime($0 " 
00-00-00")-systime(); print int(dt/86400+1) " days";}'

... with the following result:

Type the future date in ISO 8601 (YYYY-MM-DD) format.
2019-07-01
awk: line 2: function systime never defined
awk: line 2: function mktime never defined

Your system appears to have 'features' that my (Ubuntu 18-04) lacks.

;-(:wq



More information about the sf-lug mailing list