m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2026-09-17 10:07:09 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2026-09-17 10:07:09 +0200
commit1729d6eef367ba8e24edb69ccba703db515fe073 (patch)
treed6f432efef4ec862ff41d4c7279e81071efa066a
parentb763b60e3385e9027fe3cbeaa006f1c48ddef756 (diff)
Add bash stuff
-rw-r--r--bash.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/bash.md b/bash.md
index 8aa926c..c3fe43a 100644
--- a/bash.md
+++ b/bash.md
@@ -37,9 +37,16 @@ Loop over lines of file:
* `-z`: is empty string
* `-n`: non-empty string
* `-f`: is regular file
+* `-d`: is a directory
* `$A == $B`: string equality, accepts globs
* `$A != $B`: string inequality
+### Numeric
+
+* `-eq`, `-ne`: equal, not equal
+* `-gt`, `-lt`: greater than, less than
+* `-ge`, `-le`: greater than or equal, less than or equal
+
## Heredocs
cat << EOF > file