Timeline for How can I test if a variable is empty or contains only spaces?
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 11, 2022 at 12:48 | comment | added | Stéphane Chazelas |
You're confusing $"..." with $'...'
|
|
| Jan 11, 2022 at 12:48 | comment | added | Stéphane Chazelas |
There are a lot of non-blank values of $var for which [[ -z $(echo $var | xargs) ]] would return true, like -n, -e \x20, "" '' \ \ \ "", etc, not to mention all the issues related to globbing.
|
|
| May 11, 2020 at 15:46 | history | edited | Noam Manos | CC BY-SA 4.0 |
added 29 characters in body
|
| May 6, 2020 at 15:50 | history | edited | Noam Manos | CC BY-SA 4.0 |
added 62 characters in body; edited body
|
| May 6, 2020 at 15:37 | history | edited | Noam Manos | CC BY-SA 4.0 |
deleted 29 characters in body
|
| May 6, 2020 at 15:36 | history | undeleted | Noam Manos | ||
| May 6, 2020 at 15:32 | history | deleted | Noam Manos | via Vote | |
| May 6, 2020 at 15:25 | history | answered | Noam Manos | CC BY-SA 4.0 |