* 2011-07-07T07:13:24+02:00 * Javier Barroso wrote:
> On Thu, Jul 7, 2011 at 5:22 AM, Kamaraju S Kusumanchi
> <[email protected]> wrote:
>> Consider the following shell script
>> #! /bin/sh
> You can use array variables if you want:
>
> names=("kama" "raju" "k a m a")
> for i in "${names[@]}"
Yes, but not with /bin/sh. OK, it's usually possible to just change the
interpreter to /bin/bash, but with /bin/sh the $@ array can be used:
$ set -- "first item" "second item"
$ for i in "$@"; do echo "$i"; done
first item
second item
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]