Reply
Thread Tools
briand's Avatar
Posts: 566 | Thanked: 145 times | Joined on Feb 2008 @ Tallahassee, FL
#11
but then you'd have to go fi-fi-fi-fi at the end...
or you could simply chant:

fi-fi-fo-fum,
I suspect a shell script-run.


sorry, couldn't resist
 

The Following User Says Thank You to briand For This Useful Post:
Posts: 1,950 | Thanked: 1,174 times | Joined on Jan 2008 @ Seattle, USA
#12
Originally Posted by penguinbait View Post
As mentioned "fi" is the end of a "if" statement

if something happens
then
do something
else
dont do something
fi
If you look at question and answer #1 in this post, ... well, it seems to me that it went

(A) If ... fi; else ... fi

rather than

(B) If ... else ... fi

which is what I'd have expected. But when I went with (B) (that is, without the first fi), the script didn't work. With (A) I had success. Is there an "implicit if" in "RC=$?" or something like that?
__________________
.
. .

Help Save This Forum
for N8x0/Diablo Users! Register and Vote for Solution #1 on this Brainstorm. (The Solution will let you see New Posts with any threads you choose -- like the N900 and Maemo5/Fremantle threads -- filtered out.) (To understand the Solution better, see these posts #17, #18, and #19.)
 
Posts: 118 | Thanked: 26 times | Joined on Feb 2008
#13
The if's and fi's have to be balanced. Assuming there are no more "if"'s in (A) in the dotted parts, then (A) will definitely NOT work.

In the original post, unless there is an additional "if" in the beginning, the first snippet is not valid. Which would explain why th unmounting didn't work. The second snippet looks correct (and is the one that is supposed to be working anways).

What's the problem?

Martin
 
Posts: 76 | Thanked: 19 times | Joined on Apr 2007
#14
Isn't it time to...

daerht
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:58.