一个关于shell变量的问题
发表于 : 2006-08-14 22:31
下面是由fwbuilder生成的一段代码。
我想问一下,这里判断变量取值的时候为什么要在前面加上一个X呢?
代码: 全选
cat /proc/net/ip_tables_names | while read table; do
test "X$table" = "Xmangle" && continue
$IPTABLES -t $table -L -n | while read c chain rest; do
if test "X$c" = "XChain" ; then
$IPTABLES -t $table -F $chain
fi
done
$IPTABLES -t $table -X
done