Linux sh命令

sh [-a] [-c] [-C] [-e] [-E] [-f] [-h] [-i] [-I][-k] [-m] [-n] [-p] [-r] [-s] [-t] [-T] [-u] [-v] [-x] [ argument ]
-a    Export all variables assigned to.
-c    Pass the string argument to the shell to be interpreted as input. Keep in mind that this option only accepts a single string as its argument, hence multi-word strings must be quoted.
-C    Don't overwrite existing files with ``>.''
-e    If not interactive, exit immediately if any untested command fails. The exit status of a command is considered to be explic- itly tested if the command is used to control an if, elif, while, or until; or if the command is the left hand operand of an ``&&'' or ``||'' operator.
-E    Enable the built-in emacs command line editor (disables -V if it has been set).
-f    Disable pathname expansion.
-h    Makes all commands use tracked aliases.
-i    Force the shell to behave interactively.
-I    Ignore EOF's from input when interactive.
-k    tells the shell to use Korn-compatible behavior in any case where the POSIX.2 behavior is different from the behavior specified by Korn. In particular, this affects the trap command.
-m    Turn on job control (set automatically when interactive).
-n    If not interactive, read commands but do not execute them. This is useful for checking the syntax of shell scripts.
-p    Turn on privileged mode. This mode is enabled on startup if either the effective user or group id is not equal to the real user or group id. Turning this mode off sets the effective user and group ids to the real user and group ids. Also on interactive shells and when enabled, this mode sources /etc/suid_profile (in- stead of ~/.profile) after /etc/profile and ignores the contents of the ENV variable.
-r    Invokes a restricted shell. In a restricted shell, you cannot do any of the following: use the cd command; change the values of the variables env, path or shell; use > or >> to redirect output; specify command names containing /. These restrictions do not apply during execution of profile files.
-s    Read commands from standard input (set automatically if no file arguments are present). This option has no effect when set after the shell has already started running (i.e. with set).
-t    Exits after reading and executing one command.
-T    When waiting for a child, execute traps immediately. If this option is not set, traps are executed after the child exits, as specified in IEEE Std1003.2 (``POSIX'') This nonstandard option is useful to put guarding shells around childs that block signals. The surrounding shell may kill the child or it may just re- turn control to the tty and leave the child alone.
-u    Write a message to standard error when attempting to expand a variable that is not set, and if the shell is not interactive, exit immediately.
-v    The shell writes its input to standard error as it is read. Useful for debugging.
-V    Enable the built-in vi command line editor (disables -E if it has been set).
-x    Write each command to standard error (preceded by a '+ ') before it is executed. Useful for debugging.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值