- 论坛徽章:
- 0
|
-p是ksh的一个选项
就好像sed -n中-n是sed的选项一样
可以这么理解
在脚本首行定义该脚本的shell解释器以后
该脚本的所有命令将利用该shell解释器解释脚本命令
例如脚本中
#!/bin/ksh -p
echo "hello"
实际执行时 脚本是执行了
- /bin/ksh -p 查找路径/echo "hello"
复制代码
至于-p的作用请查看ksh manpage
- ksh manpage
- -p
- Privileged mode. Disabling -p sets the effective user id to the real user id, and the effective group id to the real group id. Enabling -p restores the effective user and group ids to their values when the shell was invoked. The -p option is on whenever the real and effective user id is not equal or the real and effective group id is not equal. User profiles are not processed when -p is enabled
复制代码 |
|