🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #75385

Simple BASH Syntax

#75385
From: Brad Appleton
Date: Fri, 10 Aug 1990 15:28
26 lines
1768 bytes
I apologize if this is the wrong newsgroup to ask this, but I didnt get
any answers on comp.unix.questions. I need to find out how to do some
simple things in BASH:

1) set a shell variable

2) set a shell array/word-list (if such a creature exists in bash)

3) (re)set the positional parameters in a shell-script

4) unset the positional parameters in a shell script.

I know how to do all of the above in sh, ksh, and csh. I currently assume
that bash syntax (except for arrays) would be the same as sh syntax.

If bash does have arrays ... are they ksh style or csh style?

If bash has its own unique syntax for arrays, could someone tell me 
a bit about them (how to refer to a given item, a subset of items, find 
the number of items, shift the array, ...)

advTHANXance
______________________ "And miles to go before I sleep." ______________________
 Brad Appleton        brad@travis.ssd.csd.harris.com   Harris Computer Systems
                          ...!uunet!hcx1!brad          Fort Lauderdale, FL USA
~~~~~~~~~~~~~~~~~~~~ Disclaimer: I said it, not my company! ~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID: <658@travis.csd.harris.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!travis!brad

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1025b4,5c1f4e8b2bc06ac0,start
X-Google-Attributes: gid1025b4,public
X-Google-ArrivalTime: 1990-08-10 15:30:34 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!travis!brad
From: brad@SSD.CSD.HARRIS.COM (Brad Appleton)
Newsgroups: gnu.misc.discuss
Subject: Simple BASH Syntax
Summary: How do I doit?
Message-ID: <658@travis.csd.harris.com>
Date: 10 Aug 90 15:28:52 GMT
Sender: news@travis.csd.harris.com
Organization: Harris Computers Systems Division, Fort Lauderdale,FL
Lines: 26
Posted: Fri Aug 10 16:28:52 1990