![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Oct 2004
Posts: 4
Rep Power: 0
![]() |
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
foothis 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()? |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Feb 2005
Posts: 12
Rep Power: 0
![]() |
Change the
done | dialog --guage "ra ra ra" 10 20 0 done && dialog --guage "ra ra ra" 10 20 0
__________________
--Vorlin "Systems administration - it's not just my job, it's how I buy video games!" |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|