I created.
Here's the script that caused the problem.
Code: Select all
#!/bin/sh
top -n 1 > /tmp/top.tmp
sed -n '/Mem\:/p' /tmp/top.tmp > /tmp/top.tmp2 # find the MEMORY line
LINE=`cat /tmp/top.tmp2 | awk -F, '{ print $1 $2 }'`
echo $LINE >> /tmp/report-video
rm -f /tmp/top.tmp*
By the way most of these special characters appear to be two-byte.
Also note that I put a backslash in front of the character
to protect the character.
Code: Select all
#!/bin/sh
top -n 1 > /tmp/top.tmp
sed -n '/Mem\:/p' /tmp/top.tmp > /tmp/top.tmp2
sed -i 's/\//g;s/\[H//g;s/\[J//g' /tmp/top.tmp2
LINE=`cat /tmp/top.tmp2 | awk -F, '{ print $1 $2 }'`
echo $LINE >> /tmp/report-video
rm -f /tmp/top.tmp*
_______________________________________________