From owner-freebsd-questions@FreeBSD.ORG Thu Aug 12 02:16:47 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F61B16A4CE for ; Thu, 12 Aug 2004 02:16:47 +0000 (GMT) Received: from post-22.mail.nl.demon.net (post-22.mail.nl.demon.net [194.159.73.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2819243D1D for ; Thu, 12 Aug 2004 02:16:47 +0000 (GMT) (envelope-from barno@amadeus.demon.nl) Received: from amadeus.demon.nl ([82.161.18.200]:63946 helo=[10.0.1.1]) by post-22.mail.nl.demon.net with esmtp (Exim 4.34) id 1Bv593-0008pv-Sc for freebsd-questions@freebsd.org; Thu, 12 Aug 2004 02:16:46 +0000 Mime-Version: 1.0 (Apple Message framework v619) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: FreeBSD questions list From: Barno Date: Thu, 12 Aug 2004 04:16:43 +0200 X-Mailer: Apple Mail (2.619) Subject: tcsh problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2004 02:16:47 -0000 hello, I've got a problem with syntax in a tcsh script. If I type this in a tcsh shell: date -v-7d "+[%d/%m/%Y:%H:%M:%S]" It returns this: [05/08/2004:04:08:48] but when I use it in a script like this: #!/bin/tcsh set Log = ` date -v-7d "+[%d/%m/%Y:%H:%M:%S] ` echo $Log it returns an error because of the [ and ]. If I remove either one of them it runs ok. How do I get the output of the script the same as in the command line? Thanks Barno