system command

Fairlight fairlite at fairlite.com
Mon Oct 31 13:45:34 PST 2005


In the relative spacial/temporal region of
Mon, Oct 31, 2005 at 03:43:25PM -0500, Dennis Malen achieved the spontaneous
generation of the following:
> I would like to place the following string in a system command:
> 
> echo "\033&oFvar searchnum=55555;CompileFile(\"260268.cs\");\015"
> 
> When this line is executed on the command line it works perfectly. The 
> following is my processing for "system":
> 
> Then:le="echo";lg="\"\\033&o";pa="Fvar 
> searchnum="{@rn{";CompileFile(\\\"260268.cs\\\");\\015\""
> 
> Then: system le<lg{pa
> 
> If I use "msgbox le<lg{pa" the line comes up in the window correctly. If I 
> cut and paste the line to the unix command line it executes properly. The 
> system command does not execute it properly. In fact, nothing happens. In 
> lieu of using "\" to put in the extra "\" and quotes I experimented with 
> using "chr". That also displayed on the message box correctly, but when used 
> with the system command nothing happened.
> 
> Also please note that "55555" that I hard wired in was properly substituted 
> for the "@rn" in the string and displays correctly.
> 
> If it works on the command line, it should work in the system command.
> 
> Any help would be appreciated.


However, look at your command.  It's an echo.  It's not being redirected
to anywhere.  Near as I can tell at a glance, your code should result in a
command of:

     echo "\033&oFvar searchnum=55555;CompileFile("260268.cs");\015

Which may be all fine and well.  But where are you capturing it?  You say
nothing happens, but all you have is an echo with no redirection, piping,
etc.  

What basically happens is that it probably echoes to the screen, but then
the screen is immediately redrawn and you don't see it.  Try using "system
noredraw" and see if it appears onscreen.

Better yet, try appending ">/tmp/debug_echo" and see if that file actually
appears and has the right contents.  I can't say more about what's failing
or not without knowing the context in which you're attempting to use this
code.  I suspect it's working but not visible.

mark->
-- 
There is no "I" in TEAM.
This would be the primary reason I've chosen not to join one.


More information about the Filepro-list mailing list