delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/08/16:44:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <009401c226c0$238d3bf0$0400a8c0@Maximus>
From: "Bryant Kwon" <bkwon AT tapestrysolutions DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Linux bash vs. Cygwin bash and $1
Date: Mon, 8 Jul 2002 13:43:39 -0700
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

Hey everyone,

I'm having some difficulty with some bash scripts that work fine on my
Linux machine, but do not work as expected on my XP machine running
Cygwin.  First off, I was searching the FAQ's and google.com for
differences between Linux bash and Cygwin bash and did not find
information I was looking for.  Does anyone know of such a reference
online?

Here is an example; I have the following script named "vcmp":

#!/bin/bash
echo "***** Listing ONLY differences..."
echo $#
if [ $# -gt 1 ]; then
  cvs -n -q update $@
else
  cvs -n -q update
fi

echo $0
echo $1
echo $2

echo "*****  CVS Compare Complete..."


I execute the command "vcmp resync_all"

In Linux bash, I get the following values:
$#  :  1
$0  :  ./vcmp
$1  :  resync_all
$2  : (null)

In Cygwin, I get the following values:
$#  :  2
$0  : /usr/cvs/cvs_scripts/vcmp
$1  :  !*   <-- where did this come from?
$2  :  resync_all

I am perplexed as to why I'm getting "!*" for $1 ?

There also seems to be a difference on what Linux considers to be the
first argument versus what Cygwin considers as the first argument.
Perhaps I am doing something incorrectly that I am not aware of...

Thanks in advance for any information!






--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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