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