commit 1a70d7d9984bdec4d1966c6bb9b632d6707546fe Author: ragib Date: Wed Feb 18 09:19:13 2026 +0000 Upload files to "/" diff --git a/input.sh b/input.sh new file mode 100644 index 0000000..78066b7 --- /dev/null +++ b/input.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +#loop: while +n=1 +while [ $n -le 6 ] +do +echo "$n" +n=$((n+1)) +sleep 2 +done + diff --git a/lab5.zip b/lab5.zip new file mode 100644 index 0000000..1c6c7d7 Binary files /dev/null and b/lab5.zip differ diff --git a/task1.sh b/task1.sh new file mode 100644 index 0000000..454dcbd --- /dev/null +++ b/task1.sh @@ -0,0 +1,4 @@ +for i in {1..10..2} +do +echo "$i" +done diff --git a/task2.sh b/task2.sh new file mode 100644 index 0000000..a51d98b --- /dev/null +++ b/task2.sh @@ -0,0 +1,4 @@ +for ((i=0;i<=5;i++)) +do +echo "$i" +done diff --git a/task3.sh b/task3.sh new file mode 100644 index 0000000..a1db24c --- /dev/null +++ b/task3.sh @@ -0,0 +1,14 @@ +#take several input from user using for loop then perform some +sum=0 +for((i=1;i<=7;i++)) +do +read -p "enter number $i:" num +sum=$((sum+num)) +done +echo "Addition: $sum" +if(($sum%2 == 0)) +then +echo "This is even number" +else +echo "This is odd number" +fi