bash中的-c是什么意思

303 阅读1分钟

-c string If the -c option is present, then commands are read from string.
If there are arguments after the string, they are assigned to the positional parameters, starting with $0.

参考: stackoverflow.com/questions/2…

总结:-c代表命令将会从字符串中读取,如果字符串后面还有参数,那么它们按顺序作为命令的参数。