|
|
|
|
|
by malux85
49 days ago
|
|
The widwit answer: "Dont do X" (and nothing more) The enlightened answer "You should use A, B or C for these reasons" Even though bash is installed on many systems, I try to encourage people to use better designed shells that have less of these footguns : Fish (https://fishshell.com/): No implicit word splitting : spaces in variables won't unexpectedly become separate arguments. Zsh (I use this: https://ohmyz.sh/): Arrays start at 1 by default, but crucially, unquoted variables don't implicitly split into multiple arguments. Nushell (https://www.nushell.sh/): Passes structured tables and records between commands : avoids fragile parsing of text with awk/grep. |
|