From owner-freebsd-questions@FreeBSD.ORG Wed Feb 18 15:44:44 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E55FF106564A for ; Wed, 18 Feb 2009 15:44:44 +0000 (UTC) (envelope-from gesbbb@yahoo.com) Received: from web32108.mail.mud.yahoo.com (web32108.mail.mud.yahoo.com [68.142.207.122]) by mx1.freebsd.org (Postfix) with SMTP id 8CFC68FC0A for ; Wed, 18 Feb 2009 15:44:44 +0000 (UTC) (envelope-from gesbbb@yahoo.com) Received: (qmail 8257 invoked by uid 60001); 18 Feb 2009 15:18:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=HuCYAnX/RbYnlOmsesjFPiI4tRY1UOC0bXhtRECge7g95DOtRd8JNKxVfGqEWwPuPKRYrT9/JVk5vDCqB16cpK52u/8REcbl4TwwXb90dd1W9OIVovKIOLsBi+2lU3uZ5ldNsOM6+WwrbVp13S8R3hzzIpFMVHQqsEXY8Fs27HU=; X-YMail-OSG: 2K.cMyMVM1nbWij7R8oJEBdxH9b_tvp2KKttEFq.rCCnh8lCCxtFs9gMnEHn5GQQpHXy1S7eNDj.onn74bH61eFhce0XWaZg1oq.xkTtnq2nUPawjtUFdqiGE1T0YRe0pK1yWa72O40fOeR0pKuXA5hWlgHWgLI.pI8879wwB.jOqFevHSpDESAm_eDXFSS7FckknldluZ0suLVFabvJNXC..OR. Received: from [76.23.177.172] by web32108.mail.mud.yahoo.com via HTTP; Wed, 18 Feb 2009 07:18:03 PST X-Mailer: YahooMailRC/1156.82 YahooMailWebService/0.7.260.1 Date: Wed, 18 Feb 2009 07:18:03 -0800 (PST) From: GESBBB To: FreeBSD Users Questions MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <502804.7096.qm@web32108.mail.mud.yahoo.com> Subject: Problem with BASH and [ ! -t 0 ] test. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2009 15:44:45 -0000 I am using this snippet of code in a bash script that is run via CRON.=0A= =A0=0A=A0=0A=0A# See if we are running via CRON=0A=A0=A0=A0 if [ != -t 0 ]=0A=A0=A0=A0=A0=A0 then=0A# Use the BASH RANDOM function to generate= a random number between 0 & 32767=0A=A0=A0=A0=A0=A0=A0=A0 RESTING=3D$((RAN= DOM/60))=0A=A0=A0=A0=A0=A0=A0=A0 sleep ${RESTING}=0A=A0=A0=A0 fi=0A=0A=A0=0A=A0=0AIt runs fine from the console; however, when run via CRON,= it outputs this error message.=0A=A0=0ATput: No terminal type specified an= d no TERM environmental variable.=0A=A0=0AI have Googled about, yet I canno= t find an answer. Perhaps some Bash guru can assist me.=0A=A0=0A-- =0AGerar= d=0Agesbbb@yahoo.com