Bash While Done

[Solved] Bash While Done | Erlang - Code Explorer | yomemimo.com
Question : bash while loop

Answered by : agenttequila

#!/bin/bash
i=0
While [ $i -le 10 ]
do echo i:$i ((i+=1))
done

Source : https://hakin9.org/bash-introduction-for-hackers-part-2/ | Last Update : Thu, 02 Jun 22

Question : bash while

Answered by : attractivepenguin

#!/bin/bash
counter=$1
factorial=1
while [ $counter -gt 0 ]
do factorial=$(( $factorial * $counter )) counter=$(( $counter - 1 ))
done
echo "$factorial"

Source : https://www.cyberciti.biz/faq/bash-while-loop/ | Last Update : Tue, 26 Apr 22

Question : While loops in bash

Answered by : 4a729krishnaa

#!/bin/bash
X=0
while [ $X -le 20 ]
do	echo $X	X=$((X+1))
done

Source : http://www.panix.com/~elflord/unix/bash-tute.html | Last Update : Wed, 07 Sep 22

Question : bash do-while

Answered by : armando-flores

while : ; do ACTION_CODE [[ CONDITION_STATEMENT ]] || break
done

Source : | Last Update : Thu, 24 Dec 20

Answers related to bash while done

Code Explorer Popular Question For Erlang