This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bash questions


In article <3.0.1.32.19980206090744.0069b668@pop.mindspring.com>,
Eric Horowitz  <ehorowitz@mindspring.com> wrote:
>I installed gnu-win32 simply to run some csh scripts that I had on a
>Solaris box. In the process of converting this script to bash I have
>encountered the following problems...
>
>1) set 
>
>   It does not seem to do anything. I have been using declare instead. Is set
>   supposed to set variables?
>
>2) let
>
>      let THREE=1+2
>
>   works fine in that 
>
>      echo $THREE
>
>   responds with 3, but...
>
>      let OLTT=1<2
>
>   responds with...
>
>      2: no such file or directory
>
>3) If I have a string of items such as...
>
>      declare ALIST="abc def ghi jkl mno pqr"
>
>   I can access items individually in a for command such as...
>
>      for ITEM in $ALIST; do
>
>  but is there a command or syntax that will let me access any one specific
>member? I would
>  like to do something like...
>
>      declare THIS_ITEM=$ALIST[$INDEX]
>
>4) test
>
>   I would like to make complicated arithmetic relational operations such
>as...
>
>   test ($V1 -lt $V2) -a ($V3 -lt $V4)
>
>   but I am not getting the syntax quite right. Is there a way to do this?

The simplest answer to all of these questions is:

    http://funnelweb.utcc.utk.edu/%7Eharp/gnu/gnu.html

You will find documentation for most GNU packages at that site.
-- 
http://www.bbc.com/	cgf@bbc.com			"Strange how unreal
VMS=>UNIX Solutions	Boston Business Computing	 the real can be."
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]