From 83017d313eb9ce885f3149e19a4b22983898f91d Mon Sep 17 00:00:00 2001 From: Sonia Hamilton Date: Fri, 16 Dec 2022 08:05:23 +1100 Subject: [PATCH] Update bash.md (#1917) * Update bash.md declare variable as integer, then increment * Update bash.md Co-authored-by: Rico Sta. Cruz --- bash.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bash.md b/bash.md index 40369cf0a..66afe4b77 100644 --- a/bash.md +++ b/bash.md @@ -637,6 +637,11 @@ $((a + 200)) # Add 200 to $a $(($RANDOM%200)) # Random number 0..199 ``` +```bash +declare -i count # Declare as type integer +count+=1 # Increment +``` + ### Subshells ```bash