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

Re: [Clip] Re: Problems with command line groff

Expand Messages
  • hsavage
    ... Larry, I don t know if it will make a difference but, have you tried the ^!Dos and ^!Shell commands, after all, it is a command line utility. ^!Dos
    Message 1 of 9 , Dec 7, 2005
    • 0 Attachment
      lm_hamilton wrote:
      > Now, I must really seem nuts.... seem? ;-)
      >
      > anyway, the ^!chdir C:\GnuWin32\bin\ before the clip fixed the problem.
      >
      > I do not understand why using the full path does not work, but setting
      > the directory does.
      >
      > Now I seem to recall that this is a topic off and on for clips of this
      > type.
      >
      > Larry
      >
      > --- In ntb-clips@yahoogroups.com, "lm_hamilton" <lmh@h...> wrote:
      >> Well, here I am showing myself one suggestion.... ;-)
      >>
      >> I had to re-boot to test adding the c:\gnuwin32\bin directory to my
      > path.
      >> That made this clip work:
      >>
      >> ^!groff -mm -Tps ^%outputdir%test >^%outputdir%testCLIP.ps
      >>
      >> where ^%outputdir%=c:\Outputs\
      >>
      >> However, I want this script to be portable and not require novice
      >> users to fiddle with the path and require a re-boot.
      >>
      >> Off to re-boot to clear the path setting and try
      >> ^!chdir C:\GnuWin32\bin\ before the above clip....
      >>
      >> Larry
      >>
      >> --- In ntb-clips@yahoogroups.com, "lm_hamilton" <lmh@h...> wrote:
      >>> I am working with some Windows ports of Unix/Linux tools from the
      >>> GnuWin32 project at Sourceforge.
      >>>
      >>> I have been working with two of them, grep and groff. They are both
      >>> Console Mode, i.e. command line only programs.
      >>>
      >>> When writing clips for such programs, I always get a working command
      >>> line and then modify it for NoteTab clips.
      >>>
      >>> The one for grep works from the Command Line and from a NoteTab clip.
      >>>
      >>> GREP Command Line:
      >>> C:\GnuWin32\bin>grep -v "^1 _UID" c:\archives\test.txt
      >>>> c:\archives\cleantest.txt
      >>> GREP Clip Command:
      >>> ^!C:\GnuWin32\bin\grep -v "^1 _UID" c:\archives\test.txt
      >>>> c:\archives\cleantest.txt
      >>> However, I cannot get the groff command that works from the Command
      >>> Line to work in a NoteTab Clip.
      >>>
      >>> GROFF Command Line:
      >>> C:\GnuWin32\bin>groff -mm -Tps C:\Outputs\test >C:\Outputs\test.ps
      >>>
      >>> I have tried all combinations of commands and quotes I can think of,
      >>> but I cannot get it to run. I have looked at all the esoteric examples
      >>> that I can find, but still no go.
      >>>
      >>> I have tried simply ^!, or ^!Run, ^!Shell, etc. with quotes around
      >>> various parts of the clip line, such as:
      >>>
      >>> ^!C:\GnuWin32\bin\groff "-mm -Tps" C:\Outputs\test >C:\Outputs\test.ps
      >>>
      >>> or
      >>>
      >>> "^!C:\GnuWin32\bin\groff "-mm -Tps" C:\Outputs\test
      >> C:\Outputs\test.ps"
      >>> or
      >>>
      >>> "^!C:\GnuWin32\bin\groff -mm -Tps C:\Outputs\test >C:\Outputs\test.ps"
      >>>
      >>> I have also tried putting the path to groff in a variable, and the
      >>> paths to the test and test.ps in a variable. Then I tried the options
      >>> -mm -Tps as part of the %groff% variable.
      >>>
      >>> Some options create a 0 byte test.ps file, but other options do not.
      >>>
      >>> My head is about to run out of hair, and I didn't have much to start
      >>> with. ;-)
      >>>
      >>> Any suggestions are most welcome!
      >>>
      >>> I am using NoteTab Pro 4.95 on WinXP Home (I have also tried it on
      >> Win2k).
      >>> TIA!
      >>>
      >>> Larry Hamilton

      Larry,

      I don't know if it will make a difference but, have you tried the ^!Dos
      and ^!Shell commands, after all, it is a command line utility.

      ^!Dos "C:\GnuWin32\bin\groff -mm -Tps C:\Outputs\test >C:\Outputs\test.ps"
      ^!Shell "C:\GnuWin32\bin\groff -mm -Tps C:\Outputs\test >C:\Outputs\test.ps"

      ºvº
      05.12.07

      "Dancing: Why Men Don't Like To."

      hrs > hsavage@...
    • acummingsus
      ... [ . . ] ... ^!C: GnuWin32 bin groff -mm -Tps C: Outputs test C: Outputs test.ps ^!C: GnuWin32 bin groff -mm -Tps C: Outputs test C: Outputs test.ps
      Message 2 of 9 , Dec 7, 2005
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "lm_hamilton" <lmh@h...> wrote:
        >
        > I am working with some Windows ports of Unix/Linux tools from the
        > GnuWin32 project at Sourceforge.
        >
        [ . . ]
        > However, I cannot get the groff command that works from the Command
        > Line to work in a NoteTab Clip.
        >
        > GROFF Command Line:
        > C:\GnuWin32\bin>groff -mm -Tps C:\Outputs\test >C:\Outputs\test.ps
        >
        > I have tried all combinations of commands and quotes I can think of,
        > but I cannot get it to run. [ . . ]

        ^!C:\GnuWin32\bin>groff -mm -Tps C:\Outputs\test >C:\Outputs\test.ps

        ^!C:\GnuWin32\bin > groff -mm -Tps C:\Outputs\test > C:\Outputs\test.ps

        Did you try like either of those (no quotes)

        I see your prob is solved via chdir.

        I'm curious about (the lack of) quotes because unless I'm mistaken the
        quotes is for when is a space in the path (and you've *no* space in
        your paths themselves). (since space is the
        arguements/commandline_options delimiter, thus a space in a path would
        be wrongly interpreted unless quotes are around such a segment which
        enable correct interpretation).

        Alan.
      • Craig
        I recently encountered a similar situation whereby calling a cmd executable using full Path/Filename just wouldn t work. I haven t had time to investigate as
        Message 3 of 9 , Dec 8, 2005
        • 0 Attachment
          I recently encountered a similar situation whereby calling a cmd executable
          using
          full Path/Filename just wouldn't work. I haven't had time to investigate as
          to why,
          but I'm sure damn curious. But be-that-as-it-may ... what I alternately did
          was first
          instructed in my batch script a change directory (cd /d PATH) to the
          executable,
          then called it from there. I don't know why, but that works ... go figure!
          Give this a
          try and see if it's your remedy as well.

          P.S. If anyone can explain this behavior, do share.

          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          "Today's the best day of my life...and now you're part of it!" ... Craig


          -----Original Message-----
          From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf
          Of lm_hamilton
          Sent: Wednesday, 07 December, 2005 5:17 PM
          To: ntb-clips@yahoogroups.com
          Subject: [Clip] Re: Problems with command line groff

          | Now, I must really seem nuts.... seem? ;-)
          | anyway, the ^!chdir C:\GnuWin32\bin\ before the clip fixed the problem.
          | I do not understand why using the full path does not work, but setting the
          directory does.
          | Now I seem to recall that this is a topic off and on for clips of this
          type.

          | Larry

          | --- In ntb-clips@yahoogroups.com, "lm_hamilton" <lmh@h...> wrote:
          |
          | Well, here I am showing myself one suggestion.... ;-)
          |
          | I had to re-boot to test adding the c:\gnuwin32\bin directory to my
          path.
          |
          | That made this clip work:
          |
          | ^!groff -mm -Tps ^%outputdir%test >^%outputdir%testCLIP.ps
          |
          | where ^%outputdir%=c:\Outputs\
          |
          | However, I want this script to be portable and not require novice
          | users to fiddle with the path and require a re-boot.
          |
          | Off to re-boot to clear the path setting and try
          | ^!chdir C:\GnuWin32\bin\ before the above clip....
          |
          | Larry
          |
          | --- In ntb-clips@yahoogroups.com, "lm_hamilton" <lmh@h...> wrote:
          | |
          | | I am working with some Windows ports of Unix/Linux tools from the
          | | GnuWin32 project at Sourceforge.
          | |
          | | I have been working with two of them, grep and groff. They are both
          | | Console Mode, i.e. command line only programs.
          | |
          | | When writing clips for such programs, I always get a working command
          | | line and then modify it for NoteTab clips.
          | |
          | | The one for grep works from the Command Line and from a NoteTab
          | | clip.
          | |
          | | GREP Command Line:
          | | C:\GnuWin32\bin>grep -v "^1 _UID" c:\archives\test.txt
          | | >c:\archives\cleantest.txt
          | |
          | | GREP Clip Command:
          | | ^!C:\GnuWin32\bin\grep -v "^1 _UID" c:\archives\test.txt
          | | >c:\archives\cleantest.txt
          | |
          | | However, I cannot get the groff command that works from the Command
          | | Line to work in a NoteTab Clip.
          | |
          | | GROFF Command Line:
          | | C:\GnuWin32\bin>groff -mm -Tps C:\Outputs\test >C:\Outputs\test.ps
          | |
          | | I have tried all combinations of commands and quotes I can think of,
          | | but I cannot get it to run. I have looked at all the esoteric
          | | examples that I can find, but still no go.
          | |
          | | I have tried simply ^!, or ^!Run, ^!Shell, etc. with quotes around
          | | various parts of the clip line, such as:
          | |
          | | ^!C:\GnuWin32\bin\groff "-mm -Tps" C:\Outputs\test
          | | >C:\Outputs\test.ps
          | |
          | | or
          | |
          | | "^!C:\GnuWin32\bin\groff "-mm -Tps" C:\Outputs\test\Outputs\test.ps"
          | |
          | | or
          | |
          | | "^!C:\GnuWin32\bin\groff -mm -Tps C:\Outputs\test
          | | >C:\Outputs\test.ps"
          | |
          | | I have also tried putting the path to groff in a variable, and the
          | | paths to the test and test.ps in a variable. Then I tried the
          | | options -mm -Tps as part of the %groff% variable.
          | |
          | | Some options create a 0 byte test.ps file, but other options do not.
          | |
          | | My head is about to run out of hair, and I didn't have much to start
          | | with. ;-)
          | |
          | | Any suggestions are most welcome!
          | |
          | | I am using NoteTab Pro 4.95 on WinXP Home (I have also tried it on
          | Win2k).
          | |
          | | TIA!
          | |
          | | Larry Hamilton
        • rpdooling
          I ve used the ^!chdir gimmick or done the same thing in Perl or Windows scripting. Also, sometimes this seems to work. Don t know why (watch for wrapping in
          Message 4 of 9 , Dec 8, 2005
          • 0 Attachment
            I've used the ^!chdir gimmick or done the same thing in Perl or
            Windows scripting. Also, sometimes this seems to work. Don't know why
            (watch for wrapping in the "Set" line:

            Set %FileName%="d:\BigLong Hairy Dir with spaces\And Longer
            still\Great Work Of Textual Art.doc"

            ^!Shell winword.exe file://"^%FileName%"



            --- In ntb-clips@yahoogroups.com, "Craig" <geekyouright@h...> wrote:
            >
            > I recently encountered a similar situation whereby calling a cmd
            executable
            > using
            > full Path/Filename just wouldn't work. I haven't had time to
            investigate as
            > to why,
            > but I'm sure damn curious. But be-that-as-it-may ... what I
            alternately did
            > was first
            > instructed in my batch script a change directory (cd /d PATH) to the
            > executable,
            > then called it from there. I don't know why, but that works ... go
            figure!
            > Give this a
            > try and see if it's your remedy as well.
            >
            > P.S. If anyone can explain this behavior, do share.
            >
            > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            > "Today's the best day of my life...and now you're part of it!" ... Craig
            >
            >
            > -----Original Message-----
            > From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com]
            On Behalf
            > Of lm_hamilton
            > Sent: Wednesday, 07 December, 2005 5:17 PM
            > To: ntb-clips@yahoogroups.com
            > Subject: [Clip] Re: Problems with command line groff
            >
            > | Now, I must really seem nuts.... seem? ;-)
            > | anyway, the ^!chdir C:\GnuWin32\bin\ before the clip fixed the
            problem.
            > | I do not understand why using the full path does not work, but
            setting the
            > directory does.
            > | Now I seem to recall that this is a topic off and on for clips of this
            > type.
            >
            > | Larry
            >
            > | --- In ntb-clips@yahoogroups.com, "lm_hamilton" <lmh@h...> wrote:
            > |
            > | Well, here I am showing myself one suggestion.... ;-)
            > |
            > | I had to re-boot to test adding the c:\gnuwin32\bin directory to my
            > path.
            > |
            > | That made this clip work:
            > |
            > | ^!groff -mm -Tps ^%outputdir%test >^%outputdir%testCLIP.ps
            > |
            > | where ^%outputdir%=c:\Outputs\
            > |
            > | However, I want this script to be portable and not require novice
            > | users to fiddle with the path and require a re-boot.
            > |
            > | Off to re-boot to clear the path setting and try
            > | ^!chdir C:\GnuWin32\bin\ before the above clip....
            > |
            > | Larry
            > |
            > | --- In ntb-clips@yahoogroups.com, "lm_hamilton" <lmh@h...> wrote:
            > | |
            > | | I am working with some Windows ports of Unix/Linux tools from the
            > | | GnuWin32 project at Sourceforge.
            > | |
            > | | I have been working with two of them, grep and groff. They are both
            > | | Console Mode, i.e. command line only programs.
            > | |
            > | | When writing clips for such programs, I always get a working command
            > | | line and then modify it for NoteTab clips.
            > | |
            > | | The one for grep works from the Command Line and from a NoteTab
            > | | clip.
            > | |
            > | | GREP Command Line:
            > | | C:\GnuWin32\bin>grep -v "^1 _UID" c:\archives\test.txt
            > | | >c:\archives\cleantest.txt
            > | |
            > | | GREP Clip Command:
            > | | ^!C:\GnuWin32\bin\grep -v "^1 _UID" c:\archives\test.txt
            > | | >c:\archives\cleantest.txt
            > | |
            > | | However, I cannot get the groff command that works from the Command
            > | | Line to work in a NoteTab Clip.
            > | |
            > | | GROFF Command Line:
            > | | C:\GnuWin32\bin>groff -mm -Tps C:\Outputs\test >C:\Outputs\test.ps
            > | |
            > | | I have tried all combinations of commands and quotes I can think
            of,
            > | | but I cannot get it to run. I have looked at all the esoteric
            > | | examples that I can find, but still no go.
            > | |
            > | | I have tried simply ^!, or ^!Run, ^!Shell, etc. with quotes around
            > | | various parts of the clip line, such as:
            > | |
            > | | ^!C:\GnuWin32\bin\groff "-mm -Tps" C:\Outputs\test
            > | | >C:\Outputs\test.ps
            > | |
            > | | or
            > | |
            > | | "^!C:\GnuWin32\bin\groff "-mm -Tps" C:\Outputs\test\Outputs\test.ps"
            > | |
            > | | or
            > | |
            > | | "^!C:\GnuWin32\bin\groff -mm -Tps C:\Outputs\test
            > | | >C:\Outputs\test.ps"
            > | |
            > | | I have also tried putting the path to groff in a variable, and the
            > | | paths to the test and test.ps in a variable. Then I tried the
            > | | options -mm -Tps as part of the %groff% variable.
            > | |
            > | | Some options create a 0 byte test.ps file, but other options do not.
            > | |
            > | | My head is about to run out of hair, and I didn't have much to
            start
            > | | with. ;-)
            > | |
            > | | Any suggestions are most welcome!
            > | |
            > | | I am using NoteTab Pro 4.95 on WinXP Home (I have also tried it on
            > | Win2k).
            > | |
            > | | TIA!
            > | |
            > | | Larry Hamilton
            >
          • Larry Hamilton
            RP/Harvey/Craig/Alan, Yes, I got it working with the ^!chdir. The clip I had of something similar had a ^!chdir in it, but I put the wrong directory after the
            Message 5 of 9 , Dec 8, 2005
            • 0 Attachment
              RP/Harvey/Craig/Alan,

              Yes, I got it working with the ^!chdir. The clip I had of something
              similar had a ^!chdir in it, but I put the wrong directory after the
              ^!chdir, so then I tried all the variations I listed. Alan, I had tried
              what you suggested also, with & without quote. I did not try ^!DOS, but
              I may later.

              At home, I purposefully installed without a space in the path, the
              default is to c:\program files\, which is what I have at work. The
              ^!chdir solved all my problems. I had not done what I was trying to do
              for awhile, so I forgot what the solution was. I am building some
              specialized clip libraries, so was trying to get it working for the
              lowest common denominator. The libraries will need to work with the
              least amount of tweaking, so I do not create more support work for
              myself. ;-)

              I do not know why the full path does not work for all exe's. It would be
              nice to know why.

              This is one of those situations that I solved myself. Usually, I do not
              email the group, because I figure it out as I write the email. ;-)
              Often, as I write an email, in trying to explain it, the light bulb goes
              on.

              It is nice to share in the been there, done that, camaraderie of this
              list. It's hard to believe that I'm coming up on 8 years as a NoteTab user.

              Thanks!

              Larry Hamilton
              Kairos Computer Solutions
              http://www.kairoscomputers.com/
              Sales Affiliate for Grisoft Anti-Virus



              rpdooling wrote:

              >I've used the ^!chdir gimmick or done the same thing in Perl or
              >Windows scripting. Also, sometimes this seems to work. Don't know why
              >(watch for wrapping in the "Set" line:
              >
              >Set %FileName%="d:\BigLong Hairy Dir with spaces\And Longer
              >still\Great Work Of Textual Art.doc"
              >
              >^!Shell winword.exe file://"^%FileName%"
              >
              >
            • abairheart
              Y all, Regarding the full path versus Chdir: I suspect the cd versus full path problem has to do with different parts of Windows/(dos) having different path
              Message 6 of 9 , Dec 14, 2005
              • 0 Attachment
                Y'all,

                Regarding the full path versus Chdir:

                I "suspect" the cd versus full path problem has to do with
                different parts of Windows/(dos) having different path parsing
                requirements.

                To test this, try converting the full path to a DOS (8+3) path.
                The rules for these conversions is to use the first 6 letters in the
                file name, followed by ~1, or ~2 ... if more than 1 file meets the six
                letter specs. I think the extension is just truncated to 3 letters.
                Try "dir /x" to test this.


                Abair
              Your message has been successfully submitted and would be delivered to recipients shortly.