使用Bash 5.0:
$ bash --help
GNU bash, version 5.0.0(1)-release-(x86_64-pc-linux-gnu)
Usage: bash [GNU long option] [option] ...
bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--pretty-print
--rcfile
--restricted
--verbose
--version这个--pretty-print选项是什么?我找不到它在Bash5.0手册页,也没有互联网!如此神秘:哦
发布于 2019-04-08 22:43:33
发现了8)
在代码源代码中,CWRU/changelog第1427行:
shell.c
- --pretty-print: new invocation option, currently undocumented, dumps
a pretty-printed version of a shell script given as an argument to
stdout我刚刚试过了,它的工作方式类似于type的函数,但适用于整个脚本!干净利落。评论将被移除!
https://stackoverflow.com/questions/55582730
复制相似问题