summaryrefslogtreecommitdiff
path: root/exemple02
diff options
context:
space:
mode:
authorjerome <jerome@xlinfo.fr>2024-04-14 17:04:20 +0200
committerjerome <jerome@xlinfo.fr>2024-04-14 17:04:20 +0200
commit50b0c03236f63fb25f40c47d204eeacbaf9b5d69 (patch)
tree9618a8ba231a221325b645415dfbe098c697dad8 /exemple02
parentfbe94e6342d80fe9a79b1391b1ce2d3e547e7dbd (diff)
downloadbash_tutorial-50b0c03236f63fb25f40c47d204eeacbaf9b5d69.tar.gz
bash_tutorial-50b0c03236f63fb25f40c47d204eeacbaf9b5d69.zip
numerotation des fichiers
Diffstat (limited to 'exemple02')
-rwxr-xr-xexemple0217
1 files changed, 17 insertions, 0 deletions
diff --git a/exemple02 b/exemple02
new file mode 100755
index 0000000..12b68ed
--- /dev/null
+++ b/exemple02
@@ -0,0 +1,17 @@
+#/usr/bin/bash
+
+# calculs arythmétiques
+a=2
+b=5
+# addition
+c=$((a+b))
+echo $c
+# incrémentation
+((c++))
+echo $c
+# entier négatif
+c=$((a-b))
+echo $c
+# division entière
+c=$((b/a))
+echo $c