Date: Fri, 01 Aug 2003 12:09:01 +0900 From: Rob Lahaye <lahaye@snu.ac.kr> To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-questions@freebsd.org Subject: Re: tcsh script: quote and spaces problems Message-ID: <3F29D9CD.90401@snu.ac.kr> In-Reply-To: <20030801022705.GC13080@dan.emsphone.com> References: <3F29C589.4030009@users.sourceforge.net> <3F29CD39.9080505@mac.com> <20030801022705.GC13080@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F29D9CD.90401>