alright, i got some code like this:
function foo() {
echo "var: $var"
}
function bar() {
for i in `seq 10 10 100`; do
var=$(($var + $i))
echo $i
done
}
bar
foo
this will set var to some value, and echo $i
if i try to add some nifty stuff to the second function
...
function bar() {
for i in `seq 10 10 100`; do
var=$(($var + $i))
echo $i
done | dialog --gauge "ra ra ra" 10 20 0
}
...
the gauge will work, but var wont be set to anything due to variable protection (or some such).
Is there any way around this, so that var will be accesible in foo()?