Skip to Content.
Sympa Menu

baslinux - Re: [BL] Another UNIX question

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: "Sheldon Isaac" <SheldonIsaac AT MyRealBox.com>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] Another UNIX question
  • Date: Sun, 19 Nov 2006 19:52:26 -0500

Steven said:

> Sheldon Isaac wrote:
> >
> > The purpose is to find out how many days it is until Jan 15 2007.
> > Under BL 3.40 here, it gives errors right away; wrong syntax.

> Why don't you use the following to get how many days have elapsed in
> the current year:

--------
date +%j

--------

> Subtract it from 365 and add it to 15 (the number of days from the end
> of the current year to Jan 15).

It worked; but I still need some basic usage instructions for the bash in
BL3.40

Thanks much,
Sheldon

---------------
#!/bin/sh
today=`date +%j`
left=`expr 365 - $today`
total=`expr $left + 15`
echo It is $total days until Jan 15.

---------------






Archive powered by MHonArc 2.6.24.

Top of Page