delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/04/12:21:21

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sun, 4 Mar 2012 18:20:30 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Weird behavior of tcsh.exe?
Message-ID: <20120304172030.GH18852@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <33438483 DOT post AT talk DOT nabble DOT com>
MIME-Version: 1.0
In-Reply-To: <33438483.post@talk.nabble.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mar  4 06:55, sborer wrote:
> 
> Hi, I'm not sure if this is a bug or some kind of feature, but it seems like
> the behavior of tcsh.exe somewhat depends on its file name.
> running the line: 
> tcsh.exe -c 'echo "d:\a\b\c"' 
> results in the output: "d". As if escaping of the argument occurred.
> if i copy tcsh.exe to a different name not starting with tcsh.exe, for
> example ntcsh.exe, then running:
> ntcsh.exe -c 'echo "d:\a\b\c"' 
> results in the output: "d:\a\b\c"
> Is this intentional? (Are there inside the code of tcsh.exe some lines that
> actually check its filename and determine its behavior accordingly?)

Yes.  If the name is tcsh, it behaves as tcsh, as csh otherwise.
As for the builtin echo command, the tcsh variant allows SysV and
BSD-style, the non-tcsh version only BSD-style.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019