NetBSD/tests/lib/libcurses/chk_gen
blymn 1a6faca1b0 Add a script that allows a check file to be created by cutting and
pasting the contents of the square brackets in the "Excess nn bytes
from slave" message emitted when the director is running in verbose
mode (-v).
2019-06-09 07:54:55 +00:00

17 lines
448 B
Bash
Executable File

#!/bin/sh
#
# Simple script that will generate a check file from input pasted
# in, translate the octal \012 to \n and \015 to \r and then printf
# the resulting string. This allows output from the verbose cursts
# test to be translated into a check file simply.
#
OUT=""
while read -r line
do
next=`echo $line | sed -e 's/\n//' -e 's/\\015/\\r/g' -e 's/\\012/\\n/g'`
OUT="${OUT}${next}"
done
OUT=`echo "${OUT}" | sed 's/\n//'`
printf "${OUT}"