delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/05/31/11:38:51

From: cjeffare AT cs DOT iupui DOT edu (Chris Jeffares)
Subject: Using arrays with the Bash Shell
31 May 1997 11:38:51 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.SOL.3.91.970531125702.6113A.cygnus.gnu-win32@ds9>
Mime-Version: 1.0
X-Sender: cjeffare AT ds9
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Is it possible to use arrays with the Bash Shell, such as this


	var[$lineno]=$line
	if ["${var[$lineno]}"= x]
	then
		echo found
	fi
		lineno=`expr $lineno + 1`


This is possible in other Shells, but is it possible in the Bash
Shell, if how do I go about it.

Thanks again

Chris J

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

	Chris Jeffares		
	Graduate Research Assistant 	 Purdue University at Indianapolis
	
	office ==> SL041, (317) 274-3089
	email  ==> cjeffare AT cs DOT iupui DOT edu
	www    ==> http://klingon.iupui.edu/~cjeffare/home.html

	The Nebraska Cornhuskers, Gotta luv 'em	
	Go Big Red!!...Huckin' Fuskers in 1997 

	"Experience...the name everyone gives to their mistakes."

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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