diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-03-25 11:53:28 +0100 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-03-25 11:53:28 +0100 |
commit | 7cb4d8944f37362b4579bcc5054e954e6701b49b (patch) | |
tree | d5cc0773925b984c0d807c893b0e7837e4ada935 | |
parent | a4b0fad555989e17b5f8d5f82088dba0d768063b (diff) |
Update bash
-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 |