Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash change variable in while loop

i=1
while read x; do
   i=$(($i + 1))
   echo $i
done <<<$(find tmp -type f)
echo $i
 
PREVIOUS NEXT
Tagged: #bash #change #variable #loop
ADD COMMENT
Topic
Name
1+8 =