KSH script arguments
Rob McMahon
cudcv at warwick.ac.uk
Fri Aug 31 20:53:58 AEST 1990
In article <1990Aug18.141141.24890 at warwick.ac.uk>, I said:
| I know ksh has `set -A array', but does it have an equivalent of "$@" for
| arrays other than the positional paramters ? We don't have ksh, and can't
| afford to get it, but when bash gets a bit more solid I will switch to it if
| it has an equivalent of csh's $array:q.
In article <842 at travis.csd.harris.com> brad at SSD.CSD.HARRIS.COM (Brad Appleton) writes:
|set -A argv "$@" ## dump positional parameters into an array
|...
|from here on in you can use ${argv[i]} instead of $i and
|${argv[*]} (${argv[@]}) in place of $* ($@).
Aha! Does this mean that ksh *does* have a way of doing csh's $array:q,
"${array[@]}" ? The only response I had before was that it didn't. Sadly
I've just discovered that the current version of bash doesn't even have `set
-A' (yet ?). Sounds like time for a posting to gnu.bash.bug.
Enquiring minds ... oh forget it.
Rob
--
UUCP: ...!mcsun!ukc!warwick!cudcv PHONE: +44 203 523037
JANET: cudcv at uk.ac.warwick INET: cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
More information about the Comp.unix.questions
mailing list