📄 mkarray.awk
字号:
#*****************************************************************************## MKARRAY.AWK - Converts the output from "od -t u1 -v" into a C array.## Copyright (c) 2001 Cirrus Logic, Inc.##*****************************************************************************## This code is executed when AWK starts, before any input lines are processed.#BEGIN { }## This code is executed for every line of the input file.# { # # We only want to process lines that have more than one # field in them (the first field is always the file offset, # which we do not put into the C array). # if(NF > 1) { # # Loop through all of the fields on the line, with the # exception of the first field. # printf " "; for(i = 1; i <= NF; i++) { # # Print this field. # printf " 0x%s,", $i; } # # Print a newline. # printf "\n"; } }## This code is executed right before AWK exits, after it has processed all the# input lines.#END { # # Print the close of the C array. # print "};" }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -