Comment Re:Korn Shell question (Score 1) 118
# 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...
# 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...