The logic for that could look something like this:
I'm not entirely clear on what you want, but that should be close. I didn't include the logout part because that doesn't sound right to me. Most unix commands don't do that to the user. Could you describe what you're doing in more detail, so we can understand your requirements better?sub notfree { # returns true if license not free # whatever you do with parsing lmstat } LOOP: { if (notfree @args) { sleep $sane_interval; redo LOOP; } else { system( @other_args); } }
After Compline,
Zaxo
In reply to Re: while loop
by Zaxo
in thread while loop
by azaria
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |