我 AWK=@AWK@
在阅读sh
脚本时发现,它类似于AWK=$(which awk)
,但它不起作用。那么有人能解释一下吗?
脚本 :
#!/bin/sh -
# makelist.sh: Automatically generate header files...
AWK=@AWK@
USAGE="Usage: $0 -n|-h|-e|-fc|-fh|-bc|-bh|-m <filenames>"
if [ "x$1" = "x" ]
then
echo $USAGE 1>&2
exit 1
fi
.....
.....
.....
-h)
set - `echo $FILES | sed -e 's/\\./_/g'`
hdr="_h_`basename $1`"
cat $FILES | $AWK '
BEGIN {
printf("/* Automatically generated file, do not edit */\n");
printf("#ifndef %s\n#define %s\n", "'$hdr'", "'$hdr'");
}
/\(\):/ {
pr = substr($2, 1, 2);
if (pr == "vi" || pr == "em" || pr == "ed") {
# XXXMYSQL: support CRLF
name = substr($2, 1, index($2,"(") - 1);
...
答案1
它说# makelist.sh: Automatically generate header files...
。
这可能意味着其他一些程序将编辑 shell 脚本并将地标替换@AWK@
为 awk 的真实路径,例如/usr/bin/awk
.