![shell脚本中`AWK=@AWK@`是什么意思](https://linux22.com/image/31005/shell%E8%84%9A%E6%9C%AC%E4%B8%AD%60AWK%3D%40AWK%40%60%E6%98%AF%E4%BB%80%E4%B9%88%E6%84%8F%E6%80%9D.png)
我 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
.