From owner-freebsd-questions@FreeBSD.ORG Fri Oct 16 12:58:53 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA6F3106568B for ; Fri, 16 Oct 2009 12:58:53 +0000 (UTC) (envelope-from kraduk@googlemail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id 4FD4A8FC18 for ; Fri, 16 Oct 2009 12:58:53 +0000 (UTC) Received: by ewy18 with SMTP id 18so1775915ewy.43 for ; Fri, 16 Oct 2009 05:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=RL4awcsYH83Hp5JDpOYI7unfr6h6abgbGG7c3SMG3C0=; b=N0J/VTxkh9hxrKCS/3ib4Raq/Ch6gmG5xojSNool8ZvbciejsQCDkw1nc6SmnYJ3ej /TGvrf1WtgBEU94MtnJkWM0EpwcEO70bsCYeFMMnJq+yo0c3mI9egG+Dw5cp+uHxcF3O tJBQ0faJ1ifd9mi73qBeT0yOdDODAoVwb03Os= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=F8EkfLosrSAQnuRpW9p+W+vj8xyDyssz/RK5CXqfJyqHUGv2ziMYNqhBRbUv0UoLa1 dSYCl1iZVh6WLOFhD49IrJRpx9XkwaGJu4k81B7EkrTYKtPRLpKX3KtuzJvRemxVU5h+ wkenqWWsHC8E3atwVhvFf+oftZ0KDEszx9EL0= MIME-Version: 1.0 Received: by 10.239.183.30 with SMTP id s30mr110548hbg.171.1255697932152; Fri, 16 Oct 2009 05:58:52 -0700 (PDT) In-Reply-To: <2dab70a30910160525q3f30a170ufb54277ae484e016@mail.gmail.com> References: <2dab70a30910160525q3f30a170ufb54277ae484e016@mail.gmail.com> Date: Fri, 16 Oct 2009 13:58:52 +0100 Message-ID: From: krad To: Paul Halliday Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: questions@freebsd.org Subject: Re: export PATH in script called via Cron. 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: Fri, 16 Oct 2009 12:58:53 -0000 2009/10/16 Paul Halliday > I have a script that I call via Cron. > > It wont work unless I include a path: > > #!/usr/local/bin/bash > PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin" > export $PATH > > which is fine and works. Out of curiosity though, why is it that if I > call it from the cl like ./test.sh I get this error: > > ./test.sh: line 3: export: > `/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin': not a > valid identifier > > The script still works but it does drop that error. > > What does it mean? > > Thanks. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > drop the $ in front of path in the export line