I have the following line in my shell script:
if [ -n "${USE_X:+1}" ]; then
I cannot figure out what the ":+1" part means. Any ideas?
|
Have a look here. That url provides the following explanation:
and has the following example:
|
||||
|
basically if $USE_X is set, the statement is evaluated to 1, otherwise null. Probably similar to
from http://tldp.org/LDP/abs/html/parameter-substitution.html#PATTMATCHING :
|
||||
|
since aioobe already answered the question itself, here's a way to search a long manpage like Bash's using a regex, using this question as an example:
The first forward-slash puts |
||||
|