Hi,
Can i use the shell script like this? When i am running the script it is hanging not giving me any output. I can redirect the output and then i can do the manipulations also but why this one is wrong. I am confused we can do like this or not..
#!/usr/bin/ksh
for line in `top`
do
cpuusage=`echo $line | cut -d " " -f7`
memusage=`echo$line | cut -d " " -f12`
echo "cpuusage is $cpuusage"
echo "memusage is $memusage"
done
Thanks