【发布时间】:2012-12-06 02:57:02
【问题描述】:
在运行 Unix shell 脚本时,您可以指定 -x 选项让 shell 在所有插值完成后打印正在执行的实际命令。例如,如果我们运行这个脚本(script.sh):
#!/usr/bin/sh
var='hello, world'
echo $var
与:
sh -x script.sh
我们得到
+ var='hello, world'
+ echo hello, world
hello, world
如何为 perl 脚本获得相同的行为?
【问题讨论】:
标签: perl