Loading ...
Sorry, an error occurred while loading the content.
 

RE: [Clip] Re: Executing programs in a network unix shell

Expand Messages
  • Wright, John - Textron Financial
    Wouldn t ^!Wait also require closing the unix shell window? ... From: jaytee556 [mailto:jerry.treece@burke.com] Sent: Friday, July 09, 2004 2:24 PM To:
    Message 1 of 4 , Jul 9 12:07 PM
      Wouldn't ^!Wait also require closing the unix shell window?

      -----Original Message-----
      From: jaytee556 [mailto:jerry.treece@...]
      Sent: Friday, July 09, 2004 2:24 PM
      To: ntb-clips@yahoogroups.com
      Subject: [Clip] Re: Executing programs in a network unix shell


      Try using the ^!Wait command in your clip.


      --- In ntb-clips@yahoogroups.com, "Wright, John - Textron Financial"
      <JWright@t...> wrote:
      > Hi,
      >
      How can I not return to NTP until the program within the shell
      > has completed? I don't want to shut down the unix shell window, so
      > ^!ShellWait won't do the trick.
      >
      > Does anyone have any ideas?
      >
      > John





      Yahoo! Groups Links
    • jaytee556
      I don t know about UNIX, but I ve used it with Windows programs exactly as you are discribing. It waits for the application I am running in Windows to close
      Message 2 of 4 , Jul 9 12:11 PM
        I don't know about UNIX, but I've used it with Windows programs
        exactly as you are discribing. It waits for the application I am
        running in Windows to close before returning to Notetab.


        --- In ntb-clips@yahoogroups.com, "Wright, John - Textron Financial"
        <JWright@t...> wrote:
        > Wouldn't ^!Wait also require closing the unix shell window?
        >
      • Wright, John - Textron Financial
        Thanks for your suggestions. Your first solution sounds like what I am already doing. The second is a bit too complicated for me. The work-around I use is
        Message 3 of 4 , Jul 13 8:51 AM
          Thanks for your suggestions. Your first solution sounds like what I am
          already doing. The second is a bit too complicated for me.

          The work-around I use is this: The clip uses the ^!keyboard keys to kick off
          the program. Following that command, another ^!Keyboard command creates a
          temporary file on the network drive. Even though focus then returns to NTP,
          the second command that creates the file doesn't actually get interperted by
          the shell until the program execution completes. Meanwhile, back in NTP, the
          clip checks for the existance of the file in a loop. When the file is found,
          the clip proceeds.

          It's not pretty, but it works. I was hopeful (but doubtful) that there was
          some simpler way to detect the completion of the program execution.

          Thanks

          -----Original Message-----
          From: thefrank [mailto:tf@...]
          Sent: Saturday, July 10, 2004 12:56 PM
          To: ntb-clips@yahoogroups.com
          Subject: [Clip] Re: Executing programs in a network unix shell


          hi john,

          you asked for ideas so here goes...

          one way:

          from NTP: in the shell script that you need to execute include a
          trigger for an event that will occur when all the previous processes
          have finished running.

          another way:

          from NTP: write a PHP webpage that will execute the shell script.
          include clip language that uploads [FTP] the file then calls the
          browser to open the webpage thus calling the shell script exec. PHP
          has built-in system functions. some will allow the shell script to
          execute completely and then move on to the next step.

          the triggered event:

          the output from the event must be recognizable by NTP on your local
          sys. you could send an email to a specific address then POP locally.
          you could update a webpage and read this from the NTP clip. the
          specific text you slurp from the output can then be used as a
          variable back in NTP clip to fork the next path [e.g. if A then B
          else C].

          the same shell script would vary from sh, csh, tsch, bash, and one
          might be better than another for your particular use.

          of course the above workaround only functions if you are also online
          while your main NTP clip is running.

          PHP system functions:
          http://us2.php.net/manual/en/ref.exec.php

          shell script help:
          http://vertigo.hsrl.rutgers.edu/ug/shell_help.html


          regards,

          tf
          http://www.thefrank.com






          Yahoo! Groups Links
        • Larry Hamilton
          One thing I did not see mentioned was the use of the ^!ShellWait command. This sometimes does a better job than the ^!Wait command. If you are using a Windows
          Message 4 of 4 , Jul 13 9:24 AM
            One thing I did not see mentioned was the use of the ^!ShellWait
            command. This sometimes does a better job than the ^!Wait command. If
            you are using a Windows command line to run the Unix shell, this might
            do it.

            I do not have a setup where I can do Unix and Windows together.

            Larry Hamilton
            lmh@...
            My Webpage
            http://members.tripod.com/~notlimah/index.htm

            Wright, John - Textron Financial wrote:
            > Thanks for your suggestions. Your first solution sounds like what I am
            > already doing. The second is a bit too complicated for me.
            >
            > The work-around I use is this: The clip uses the ^!keyboard keys to kick off
            > the program. Following that command, another ^!Keyboard command creates a
            > temporary file on the network drive. Even though focus then returns to NTP,
            > the second command that creates the file doesn't actually get interperted by
            > the shell until the program execution completes. Meanwhile, back in NTP, the
            > clip checks for the existance of the file in a loop. When the file is found,
            > the clip proceeds.
            >
            > It's not pretty, but it works. I was hopeful (but doubtful) that there was
            > some simpler way to detect the completion of the program execution.
            >
            > Thanks
          Your message has been successfully submitted and would be delivered to recipients shortly.