PEER=`echo $line | sed -e 's/.*\[\(....\)\].*/\1/'`
PID=`echo $line | sed -e 's/.*mesh-\([0-9]*\).*/\1/'`
echo "$PID => $PEER"
- cat .log | sed -e "s/mesh-$PID/MESH $PEER/" > .log2
+ cat .log | sed -e "s/mesh-\([a-z2]*\)-$PID/MESH \1 $PEER/" > .log2
mv .log2 .log
done
cat .log | sed -e 's/mesh-api-/mesh-api- /g' > .log2
mv .log2 .log
-kwrite .log --geometry 960x1140-960 &
-
+if [[ "`ps aux | grep "kwrite .lo[g]"`" = "" ]]; then
+ kwrite .log --geometry 960x1140-960 &
+fi