Slashdot Mirror


User: cecooke

cecooke's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Re:Korn Shell question on David Korn Tells All · · Score: 1

    # More to the point, thanks to the way ksh works, you can do this:

    # make an array, words, local to the current function
    typeset -A words

    # read a full line
    read line

    # split the line into words
    echo "$line" | read -A words

    # Now you can access the line either word-wise or string-wise - useful if you want to, say, check for a command as the Nth parameter,
    # but also keep formatting of the other parameters...