RE: howto linux
"Kevin Barr" <kmb-25+bR1YndWNWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.games.mame.advancemame.user |
|---|---|
| Message-ID | <001c01c4b978$bdedf840$6501a8c0@OFFICE2> |
Someone else might have a better idea, but how about calling a small
script instead which would launch advmenu then conditionally poweroff or
exit based on the output...something like [not tested or complete]:
#!/usr/bin/perl
exec('poweroff') unless ( `advmenu 2>&1` =~ /foobar/i );
# note: those are back-angled single quotes around advmenu,
# the ones on the key with the tilde (~)...the ones around
# poweroff meanwhile are straight single quotes.
The "foobar" in the regexp would need to be changed to something that
would actually match on an error and only an error...Perl's probably
overkill too, but I'm kinda a one-trick pony in Linux scripting.
-----Original Message-----
but if theres an error. eg "can't load svgalib" the pc would just trun
off.
dose any one
know how to
advmame
if error then exit
else init 0
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/advancemame-users