Skip to content

Commit 1030de5

Browse files
authored
Fix -v example (#174)
1 parent 9771475 commit 1030de5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ebook/en/content/009-bash-conditional-expressions.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ Here is a list of the most popular Bash conditional expressions. You do not have
8585
* True if the shell variable varname is set (has been assigned a value).
8686

8787
```bash
88-
[[ -v ${varname} ]]
88+
[[ -v varname ]]
8989
```
9090

91+
> Here, `varname` is the name of the variable. The `-v` operator expects a variable name as an argument rather than a value, so if you pass `${varname}` instead of `varname`, the expression will return false.
92+
9193
True if the length of the string is zero.
9294

9395
```bash

0 commit comments

Comments
 (0)