Branch: Tag:

2014-02-26

2014-02-26 17:34:59 by Arne Goedeke <el@laramies.com>

printf is not portable

printf is not available on many unix like system (e.g. embedded ARM fan
controllers). cat with here-document should be even more widely
available. Thanks to Chris Angelico for proposing this solution.

1:   #!/bin/sh    - printf "/* File generated on `date` + cat <<END + /* File generated on `date`   by getwhitespace <UnicodeData.txt */      #define SPACECASE8 \\ -  case ' ':case '\\\\t':case '\\\\r':case '\\\\n':case '\\\\v':case '\\\\f': \\ +  case ' ':case '\\t':case '\\r':case '\\n':case '\\v':case '\\f': \\    case 0x85:case 0xa0: - " + END    - printf '#define SPACECASE16 SPACECASE8 ' + cat <<END + #define SPACECASE16 SPACECASE8 \\ + END   sed -n -e '   s/^\([0-9A-Fa-f]*\);[^;]*;[^;]*;[^;]*;\([^;]*\);/\1 \2 /   /;INFORMATION SEPARATOR /d