diff options
-rw-r--r-- | bash.md | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -29,6 +29,27 @@ Loop over integers ## Conditionals * `-z`: is empty string +* `-n`: non-empty string * `-f`: is regular file * `$A == $B`: string equality, accepts globs * `$A != $B`: string inequality + +## Heredocs + + cat << EOF > file + bla bla + EOF + +Ignoring the initial indent: + + ... + cat <<- EOF > file + bla bla + EOF + ... + +Don't interpolate variables: + + cat << 'EOF' > file + bla bla + EOF |