Unix scripting help
Chris Sheffield
revlist at cableone.net
Thu Oct 6 10:03:24 EDT 2005
I think I finally got this figured out. Turns out, Sarah, your idea
did work, but I had to redirect output to a file, just like you're
doing. And that made it so my script stopped hanging. What's
strange, though, is that when I look at the contents of the file that
gets created it's empty, so I'm still not really sure what the
problem was. But at least it's working now, and having a little
empty file get created is a small price to pay for not rebooting the
user's machine.
Thanks for the help.
Chris
On Sep 29, 2005, at 2:41 PM, Sarah Reichelt wrote:
>
> Hi Chris,
>
> Here is an example of a script I use that really does run in the
> background.
>
> put "ping -c1 -n " & pIP into tShellCmd
> put " > " & tFileName & " 2>&1 &" after tShellCmd
> get shell(tShellCmd)
>
> I tried using the ampersand and it didn't work but this does. It
> writes it's output to a file which you may not need, but the crucial
> bit is the " 2>&1 &" which allows my Rev script to continue without
> waiting for the shell command to finish.
>
> You can feed your lines into the variable "tShellCommand" although you
> may not need the "exit" at all.
>
> I hope this helps as I detest installers that require me to do a
> reboot. I feel it is nearly always due to lack of understanding or
> programmer laziness rather than because the system really needs to
> restart.
>
> Cheers,
> Sarah
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
------------------------------------------
Chris Sheffield
Read Naturally
The Fluency Company
http://www.readnaturally.com
------------------------------------------
More information about the use-livecode
mailing list