I'm sure it is relatively simple, I just don't know how to do it.
#!/usr/bin/ksh set `iostat` myvar=6
I want to something like
echo $($myvar) which i want interpreted as
You can do this sort of thing with
The trick is to double-quote the string you feed to
I got "%user" for the output, but I tried it on a multi-processor RHEL machine.
In ksh93 (and recent enough versions of mksh and bash), you can write
In older shells, including ksh88 and pdksh, your only recourse is to use