etcd/tools/etcd-dump-logs/testdecoder/decoder_correctoutputformat.sh

11 lines
214 B
Bash
Raw Normal View History

2018-05-31 23:45:37 +03:00
#!/bin/bash
while read line
do
LEN=$(echo ${#line})
if [ $LEN -ge 20 ]; then
echo "OK|$line" | tr 1234567890 abcdefghij
else
echo "ERROR|$line" | tr 1234567890 abcdefghij
fi
done < "${1:-/dev/stdin}"