Timeline for Bash -c with positional parameters
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 27, 2014 at 11:06 | comment | added | Stéphane Chazelas | Careful with the analogy with argv[0]. $0 is only set to the argv[0] passed to execve() when it's like sh or bash. For scripts, $0 is set to the path given as argument 1, 2... to the interpreter (and for scripts executed directly, that comes from the first path argument to execve()). | |
| Aug 27, 2014 at 10:40 | comment | added | muru | Can you give an (hopefully real-world) example of the second para? | |
| Aug 27, 2014 at 10:22 | history | answered | Michael Homer | CC BY-SA 3.0 |