Search Results

Search: Posts Made By: Adarshreddy01
7,938
Posted By Adarshreddy01
Bash Variable scope - while loop while reading from a file
Cope sample1: test.sh
i=0
echo " Outside loop i = $i "
while [ $i -le 5 ]
do
i=$(( $i + 1))
echo "Inside loop i = $i "
done
echo " Out of loop i is : $i "


When run output :
Outside...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 04:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy