Timeline for How to extract every command line, exit code and stdout/stderr in one script
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 25, 2017 at 10:28 | comment | added | Guss |
I think that is so, checkout the LiquidPrompt application that does something similar (capturing exit code). but I thought you already had that solved. The PROMPT_COMMAND allows you to set up the capture for the next command.
|
|
| Jul 25, 2017 at 10:19 | comment | added | Ikaso | If I understand correctly the prompt command is executed right before the prompt is displayed so I will be able to read the last command exit code. Since the command I want to monitor is executed before the PROMPT_COMMAND when will I have a chance to redirect its output? | |
| Jul 25, 2017 at 9:06 | history | edited | Guss | CC BY-SA 3.0 |
added information about tty applications
|
| Jul 25, 2017 at 9:00 | history | edited | Guss | CC BY-SA 3.0 |
fixed name of variable
|
| Jul 25, 2017 at 9:00 | comment | added | Guss |
Then read about $PROMPT_COMMAND. you'd probably want to close and reopen your exec every time that gets run
|
|
| Jul 25, 2017 at 8:53 | comment | added | Ikaso | Yes I want a different capture per command | |
| Jul 25, 2017 at 7:31 | history | answered | Guss | CC BY-SA 3.0 |