decoder_correctoutputformat.sh 214 B

12345678910
  1. #!/bin/bash
  2. while read line
  3. do
  4. LEN=$(echo ${#line})
  5. if [ $LEN -ge 20 ]; then
  6. echo "OK|$line" | tr 1234567890 abcdefghij
  7. else
  8. echo "ERROR|$line" | tr 1234567890 abcdefghij
  9. fi
  10. done < "${1:-/dev/stdin}"