Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    I'm not familiar with ksh88, but if you need to pass the entire array by value, have you tried func "${array[@]}"? If you only need to pass one element, just pass the element - no need to make it more convoluted by passing an array and an index. Commented Jun 22, 2012 at 12:14
  • I tried the syntax you suggested, but it did not work :( Commented Jun 22, 2012 at 12:29
  • 1
    I was tired and confused. I had tried "${array[$@]}. Your suggestion actually works. Mea culpa. Commented Jun 26, 2012 at 15:11