[luau] Shell Script Help

whenever whatever at whoever.net
Sun Jul 14 10:26:01 PDT 2002


Could this script be a problem on the 1st of each month?

On Sunday 14 July 2002 09:42 am, you wrote:
> Hello Mike,
>
> I wrote a script on my Solaris 2.6 box at work that looks something like
> this:
>
> #!/usr/bin/sh
>
> TODAY=`date +%y%m%d`
> echo $TODAY
> echo "---"
> YESTERDAY=`echo $TODAY | awk -F"/" '{print "1 day ago " $1 "/" $2 "/" $3 -
> 1}'`
>  echo $YESTERDAY
> ###END
>
> You could always use the '--' operand to decrement vice "$3 - 1"
>
> -Doug Muhlbauer
> ----- Original Message -----
> From: "Mike Ballon" <calzonie at hotmail.com>
> To: <luau at videl.ics.hawaii.edu>
> Sent: Friday, July 12, 2002 9:54 AM
> Subject: [luau] Shell Script Help
>
> > To those that don't know me Aloha, to those that do how come nobody told
>
> me
>
> > about the new list :P
> >
> > The scipt below works fine a Linux box but I need it work on my Solairs
>
> 2.7
>
> > box.  Basically I just need a scipt that writes yesterday's date in the
> > format of yymmdd, thanks.
> >
> > #!/bin/sh
> > # used to test date
> >
> > TODAY=`date +%y%m%d`
> > echo $TODAY
> > echo "---"
> > #Get day ago
> > YESTERDAY=$(date --date "1 day ago" +%y%m%d)
> > echo $YESTERDAY
> > _______________________________________________
> > LUAU mailing list
> > LUAU at videl.ics.hawaii.edu
> > http://videl.ics.hawaii.edu/mailman/listinfo/luau
>
> _______________________________________________
> LUAU mailing list
> LUAU at videl.ics.hawaii.edu
> http://videl.ics.hawaii.edu/mailman/listinfo/luau



More information about the LUAU mailing list