bash:output:troubleshooting:badly-written_commands
Differences
This shows you the differences between two versions of the page.
bash:output:troubleshooting:badly-written_commands [2021/01/26 15:17] – created peter | bash:output:troubleshooting:badly-written_commands [2021/01/26 15:19] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== BASH - Output - Troubleshooting - Badly-written commands ====== | ====== BASH - Output - Troubleshooting - Badly-written commands ====== | ||
+ | |||
+ | Some commands are not well-written, | ||
+ | |||
+ | You must keep an eye out for such commands, and work around them when necessary. | ||
+ | |||
+ | For example: | ||
+ | |||
+ | <code bash> | ||
+ | vers=$(python --version) | ||
+ | Python 2.7.13 | ||
+ | echo " | ||
+ | {} | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | Thus, it appeared on the terminal, and was not captured in the vers variable. | ||
+ | |||
+ | To fix, you would need to use **2>& | ||
+ | |||
+ | </ | ||
bash/output/troubleshooting/badly-written_commands.1611674260.txt.gz · Last modified: 2021/01/26 15:17 by peter