1#!/bin/sed -rf 2# Process a text input, to turn it into a C string for the XEN_BANNER macro. 3 4# Strip trailing whitespace. 5s_ *$__ 6 7# Escape backslashes. 8s_\\_\\\\_g 9 10# Enclose the line in "...\n". 11s_(.*)_"\1\\n"_ 12 13# Trailing \ on all but the final line. 14$!s_$_ \\_ 15 16# Append closing header guard 17$a\ 18\ 19#endif /* XEN_COMPILE_H */ 20