Computing.Net > Forums > Unix > Array in Bourne Shell

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Array in Bourne Shell

Reply to Message Icon

Name: Sagri
Date: May 5, 2003 at 08:56:39 Pacific
OS: UnixWare
Comment:

Hello,
What's the alternative to array in Bourne shell??

Thanks in advance.
Sagri



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: May 5, 2003 at 09:16:18 Pacific
Reply:

Sagri:

Unfortunately, the Bourne shell doesn't support arrays. You're forced to use a unix tool such as awk or perl or, perhaps, go to a compiled language such as "C".

Regards,


Nails


0

Response Number 2
Name: Sagri
Date: May 5, 2003 at 12:04:31 Pacific
Reply:

Thanks Nails!

I didn't know how to use Pearl in scripting.

Can I use Pearl in Bourne shell script??

Would you share some of your bright ideas to proceed me further.

Appreciated!
Sagri


0

Response Number 3
Name: WilliamRobertson
Date: May 6, 2003 at 15:47:26 Pacific
Reply:

Yes. But it's called perl.

Is ksh not an option? That gives arrays with e.g:
set -A arrayname var1 var2 var3
print "The third element is '${arrayname[2]}'."


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Fetching specific lines f... replacing the ` symbol in...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Array in Bourne Shell

array in Borne Shell www.computing.net/answers/unix/array-in-borne-shell/3957.html

go to in bourn shell www.computing.net/answers/unix/go-to-in-bourn-shell/5103.html

Sort and count in bourne shell www.computing.net/answers/unix/sort-and-count-in-bourne-shell/5531.html