Alok Mishra:
command: ["/bin/sh"]
args: ["-c", "while true; do echo hello; sleep 10;done"]
Hello guys, Can anyone help me to understand, what is the significance of using -c in args field?
Alok Mishra:
command: ["/bin/sh"]
args: ["-c", "while true; do echo hello; sleep 10;done"]
Hello guys, Can anyone help me to understand, what is the significance of using -c in args field?
Paweł Cyrklaf:
Bash provides extensive debugging features. The most common is to start up the subshell with the -x option, which will run the entire script in debug mode. Traces of each command plus its arguments are printed to standard output after the commands have been expanded but before they are executed.
Alok Mishra:
and what about -c option. why this is useful
Luis Hernandez:
with -c you can execute commands that are passed as a string
bash -c 'echo hello world'