I am running following script to monitor some processes and store the output in html file. But on running, it gives the error top: failed tty get
.
Here is the script:
var=4
while [ $var -ge 0 ]
do
`echo q | htop --p=2164 | aha --black --line-fix >> htop2.html`
#$cmd
sleep 1
var=$(($var-1))
done
Please guide me to solve this error!