August 30, 2002 Timothy Prickett Morgan
The tech tip for splitting a Qshell variable is certainly one way to do it, but it seems to me a roundabout approach.
My first thought would be to use the “split” command in awk, but awk does not seem to be a supported language in Qshell.
Instead, I would use the “cut” command, which is supplied along with Qshell. Something like this example:
first=$(echo $name | cut -d " " -f 1) last=$(echo $name | cut -d " " -f 2)
We have to pipe the variable into the “cut” command because cut normally works on