From owner-freebsd-questions@FreeBSD.ORG Thu Jul 31 20:08:36 2003 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 4233D37B401 for ; Thu, 31 Jul 2003 20:08:36 -0700 (PDT) Received: from spam2.snu.ac.kr (spam2.snu.ac.kr [147.46.10.68]) by mx1.FreeBSD.org (Postfix) with SMTP id ABE6D43F85 for ; Thu, 31 Jul 2003 20:08:34 -0700 (PDT) (envelope-from lahaye@snu.ac.kr) Received: (snipe 18892 invoked by alias); 1 Aug 2003 03:25:13 -0000 Received: from lahaye@snu.ac.kr with Spamsniper2.0 (Processed in 0.012588 secs); Received: from unknown (HELO sis1.snu.ac.kr) (147.46.10.36) by 0 with SMTP; 1 Aug 2003 03:25:13 -0000 X-RCPTTO: freebsd-questions@freebsd.org,dnelson@allantgroup.com, Received: from snu.ac.kr ([147.46.44.183]) by sis1.snu.ac.kr (8.12.9/8.12.9) with ESMTP id h7138Rmx127956; Fri, 1 Aug 2003 12:08:27 +0900 Message-ID: <3F29D9CD.90401@snu.ac.kr> Date: Fri, 01 Aug 2003 12:09:01 +0900 From: Rob Lahaye Organization: Seoul National University - South Korea User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030726 X-Accept-Language: en-us, ko-kr MIME-Version: 1.0 To: Dan Nelson References: <3F29C589.4030009@users.sourceforge.net> <3F29CD39.9080505@mac.com> <20030801022705.GC13080@dan.emsphone.com> In-Reply-To: <20030801022705.GC13080@dan.emsphone.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: tcsh script: quote and spaces problems 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: Fri, 01 Aug 2003 03:08:36 -0000 Dan Nelson wrote: > > Actually it doesn't. You get this result because sh splits variables > on $IFS before passing the result to a command, so what echo gets is > argv[1]="-f \"t" > argv[2]="\"" I come to the conclusion that there's no intuitive solution in a tcsh script for set foo='-f "a "' My unix knowledge tells me the following should work: set foo="-f\ \"a\ \ \"" but tcsh does not allow these escape sequences; the backslashes become real backslashes and an error occurs on too many quotes. Another odd behaviour occurs when I say: set foo="a b c" which tcsh reduces to "a b c", despite the quotes. I'd say very un-unix like behaviours.... Rob.