1 2 3 4 5 6 7 8 9 10
#!/bin/sh TYPE="$1" INPUT="linux-input.h" awk " /EV_VERSION/ { next }; /_MAX/ { next }; /#define $1_/ { printf(\"\t[ %-16s ] = \\\"%s\\\",\n\", \$2, \$2); } " < $INPUT