Home | History | Annotate | Line # | Download | only in libcurses
      1 #!/bin/sh
      2 #
      3 # Simple script that will generate a check file from input pasted
      4 # in, translate the octal \012 to \n and \015 to \r and then printf
      5 # the resulting string.  This allows output from the verbose cursts
      6 # test to be translated into a check file simply.
      7 #
      8 OUT=""
      9 while read -r line
     10 do
     11 	next=`echo $line | sed -e 's/%/%%/g' -e 's/\n//' -e 's/\\015/\\r/g' -e 's/\\012/\\n/g'`
     12 	OUT="${OUT}${next}"
     13 done
     14 OUT=`echo "${OUT}" | sed 's/\n//'`
     15 
     16 printf "${OUT}"
     17