OUTPUT are ruinned
Dear *,
I wrote a small script as below shown
but output result in file is all ruinned contained strange symbols like
--------------------------------------------------------------------------------------
9;49m^[[m^[(B 99.7% ^[[m^[(B^[[39;49mid,^[[m^[(B^[[39;49m^[[m^[(B 0.0% ^[[m^[(B^[[39;49mwa,^[[m^[(B^[[39;49m^[[m^[(B 0.0% ^[[m^[(B^[[39;49mhi,^[[m^[(B^[[39;49m^[[m^[(B 0.0% ^[[m^[(B
--------------------------------------------------------------------------------------
My script looks like this
#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 10 ];do
date +%c >>/tmp/topresult
sleep 5s
top >> /tmp/topresult
done
Any hints for this problem?
How to I get rid of those strange symbols for outputing result to file?
|