'sh' script spawning Sun 'cmdtool' running program

'sh' script spawning Sun 'cmdtool' running program

Post by Wade Guthr » Wed, 11 May 1994 08:29:27



Actually, its more complicated than I could get into the subjet line.
I have a Bourne shell script that is spawning a Sun command tool
running a program.  The program has command-line arguments (this works
when the command-line arguments are removed).  I want the command tool
to remain after the program stops running (so I can examine its
output).  I would expect that I would have to use the '-I' option to
the command tool (but this doesn't work).  The shell script looks
(abridged) like the following:

        #! /bin/sh -f

        # *** PROCESS COMMAND-LINE ARGUMENTS ***
        # set 'debug' based on command-line arguments

        # *** START THE SOFTWARE ***

        cmd_window=" cmdtool"

        invoke=" -I \"hmon -d $debug\""
        command="$cmd_window $invoke"

        echo COMMAND: $command
        $command &

The 'echo' types 'COMMAND: cmdtool -I "hmon -d 50"', just like I'd expect
(and, when run on the command line of a Bourne shell, works perfectly).
But, the script causes a command tool to appear with the following
statement:

        "hmon
        50":  No such file or directory

How can I do what I'm trying to do?

Thanks!

--
Wade Guthrie                     | "They couldn't hit an *elephant* at this

I don't speak for Rockwell.      | Sedgewick, American Civil War.

 
 
 

1. XFree86 can run any apps...'/bin/sh:can't map .....'

Installed Slackware 3.2 and XFree86 3.2, but am have 2 major problems with
X

1-  The display is very small with 1-2 inches of black around the screen.
I'm sure I configured it right, (Mach 64).

2- More importantly I can't run any applications within X.  When I click
and select an item, it just does nothing.  When I exit X, I see a list of
messages (no doubt made when I tryed to run an app) saying "/bin/sh: Can't
map '/lib/libc.so.5".  What does this mean, and how can I correct this.

Thanks for the help
Jeff

2. Dual Scan LCD under X 4.0.2

3. UW7: Script will not run without 'sh'

4. nubus Kernel in LinuxPPC 2000

5. 'sh' after 'chroot'

6. re-partitioning filesystems

7. Problem with 'while' loop in 'sh'

8. xinetd ipop3d & dns lookups

9. An extensive comparison of 'sh' and 'csh' language features

10. ksh script leaving 'running jobs' that aren't

11. 'su --login user -c command' doesn't run loggin scripts

12. Apache and 'couldn't spawn child process'