This is probably a very simple / stupid question, but I am not understanding why I am not getting the expected value when I run this:
FOUND_FRONTDEV=false
echo "$PATHS" |
while IFS= read -r line
do
FOUND_FRONTDEV=true
echo "$FOUND_FRONTDEV"
break
done
echo "$FOUND_FRONTDEV"
It returns "true" then "false". It looks like the variable is local but it should not be. I am really confused why my second echo prints false. Does anyone know please?