(Reply) dreport in script file

Butch Ammon butch at rich.srcoils.com
Thu Sep 30 08:46:56 PDT 2004


Butch Ammon wrote:
[...]
> day=`date +%a`
> if [ "$day" -eq Mon ]
[...]

"-eq" is a numeric compare.  The Bourne shell will compare two non-numeric
values here as "true".

You want:

    if [ "$day" = Mon ]

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

That's it!!  D'uh, now I feel stupid!  How much do I owe you, ken?  :)

Butch Ammon

--------------------------------------------------
This Message Was Sent To The Following Recipients:
--------------------------------------------------
Original:
  Mailed To: filepro-list at lists.celestial.com
  Mailed To: kenbrody at bestweb.net  (Kenneth Brody)


More information about the Filepro-list mailing list