delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/10/18:00:47

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sun, 10 Aug 2008 17:00:05 -0500 (CDT)
From: Tim McDaniel <tmcd AT panix DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Funny behavior with echo command in bash_login
In-Reply-To: <20080810213324.GA1792@client-04>
Message-ID: <Pine.NEB.4.64.0808101653590.19705@panix2.panix.com>
References: <20080810213324 DOT GA1792 AT client-04>
MIME-Version: 1.0
X-IsSubscribed: yes
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 Mon, 11 Aug 2008, B'Joe <eco94h AT gmail DOT com> wrote:
> This is my bash_login:
>
> echo Portable Cygwin v1.0.0.0 alpha
> echo ******************NOTE**********************
> echo Cygwin making modification in HKCU registry
> echo To completely clean Cygwin Portable
> echo installation run clean.bat in root directory
> echo ********************************************
>
>
> and this is what I get while login:
>
>
> Portable Cygwin v1.0.0.0 alpha
> ******************NOTE**********************
> Cygwin making modification in HKCU registry
> To completely clean Cygwin Portable
> installation run clean.bat in root directory
> Data Mail max_mem.c mbox msmtp.log procmail.log tmp
>
> Look at the last line, bash seen interpreted my echo command in last
> line as ls command, that not suppose to be.

It *is* supposed to be.  Unlike cmd on Windows, metacharacters like *
and ? and [...] are interpreted by bash.  *****...* is equivalent to
*, and * matches all the files in the current directory.

In general, quote your arguments.  Single-quote unless you want to do
variable interpolation ($abc), in which case double-quote.

echo 'Portable Cygwin v1.0.0.0 alpha'
echo '******************NOTE**********************'
echo 'Cygwin making modification in HKCU registry'
echo 'To completely clean Cygwin Portable'
echo 'installation run clean.bat in root directory'
echo '********************************************'

-- 
Tim McDaniel, tmcd AT panix DOT com

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

- Raw text -


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