query: Why people using "x" to check if a variable is empty in shell, like `if [ "x${BASH_VERSION}" = "x" ]; then` ...?
positive_passages.docid: 19713
positive_passages.text: Why do shell script comparisons often use x$VAR = xyes?
negative_passages.docid: 70911
negative_passages.text: What does env x='() { :;}; command' bash do and why is it insecure?
negative_passages.docid: 157559
negative_passages.text: In a Bash if condition, how to check whether any files matching a simple wildcard expression exist?
negative_passages.docid: 133199
negative_passages.text: What does outputting to /dev/null accomplish in bash scripts?
negative_passages.docid: 23333
negative_passages.text: How can I expand a quoted variable to nothing if it's empty?
negative_passages.docid: 25478
negative_passages.text: What does ${1+"$@"} mean in a shell script, and how does it differ from "$@"?
negative_passages.docid: 89588
negative_passages.text: Why do I need to quote variable for if, but not for echo?
negative_passages.docid: 74331
negative_passages.text: Are there naming conventions for variables in shell scripts?
negative_passages.docid: 1528
negative_passages.text: Simple logical operators in Bash
negative_passages.docid: 119040
negative_passages.text: unix test when to use eq vs = vs == in test commands?
negative_passages.docid: 138524
negative_passages.text: $* in bash scripting
negative_passages.docid: 23092
negative_passages.text: What does "$$" mean in the shell?
negative_passages.docid: 129350
negative_passages.text: What is the meaning of ${GZIP_BINDIR-'/bin'} in bash?
negative_passages.docid: 154604
negative_passages.text: Why is there a /bin/echo and why would I want to use it?
negative_passages.docid: 107557
negative_passages.text: Shell usage of ":-" and advantage
negative_passages.docid: 50416
negative_passages.text: What does the >?= operator mean?
negative_passages.docid: 42711
negative_passages.text: What does $$ mean in the shell?