Trying to run nohup from Korn shell but getting Bourne shell errors

Trying to run nohup from Korn shell but getting Bourne shell errors

Post by GCV » Sat, 30 May 1998 04:00:00



Help! Duh!
I would like to run a process in background with nohup on a
SOLARIS 2.3. How can I get the korn shell script detectsetup
to be interpreted under ksh.

In Korn shell I attempted...

$ /bin/ksh -c "/usr/bin/nohup /export/home/setupin/detectsetup&"

$ [1]   15276

$ Sending output to nohup.out

Checking the process I find....

USER   PID    PPID COMMAND
pagein 15414     1 sh /export/home/setupin/detectsetup
                            ^
                           | Why not Korn shell

My nohup.out file errors indicate Bourne shell is interpreting Korn shell
script (doesn't understand integer or [[).      

 
 
 

Trying to run nohup from Korn shell but getting Bourne shell errors

Post by Denari » Sat, 30 May 1998 04:00:00



Quote:>Help! Duh!
>I would like to run a process in background with nohup on a
>SOLARIS 2.3. How can I get the korn shell script detectsetup
>to be interpreted under ksh.

#!/usr/bin/ksh
as a first line ?

Roger D

 
 
 

Trying to run nohup from Korn shell but getting Bourne shell errors

Post by The man from the great white nor » Sat, 30 May 1998 04:00:00



Quote:>Help! Duh!
>I would like to run a process in background with nohup on a
>SOLARIS 2.3. How can I get the korn shell script detectsetup
>to be interpreted under ksh.

>In Korn shell I attempted...

>$ /bin/ksh -c "/usr/bin/nohup /export/home/setupin/detectsetup&"

>$ [1]   15276

>$ Sending output to nohup.out

>Checking the process I find....

>USER   PID    PPID COMMAND
>pagein 15414     1 sh /export/home/setupin/detectsetup
>                            ^
>                           | Why not Korn shell

>My nohup.out file errors indicate Bourne shell is interpreting Korn shell
>script (doesn't understand integer or [[).      

You have to put #!/bin/ksh as your first line in
/export/home/setupin/detectsetup if this is a korn shell script.

NOTE: To reply via e-mail, remove the 'anti-spam-' from my e-mail adress

 
 
 

1. Telling Bourne shell from Korn shell at start-up

Hello,

I would like to find a way to tell Bourne shell from Korn shell
at start-up (when reading `$HOME/.profile').

A good solution shouldn't depend on the setting of
environment variable(s), as they are easily faked.

I have yet to find a suitable test, to be put in `$HOME/.profile',
to (for instance) bind keyboard keys when read by the Korn shell,
and to do nothing when read by the Bourne shell. I have read the FAQ,
to no avail. I have read the manuals too...

E-mail answers prefered.

Best regards,
--
Ronan Melennec        | Service Technique de la Navigation Aerienne
+33 1 60 79 82 40     | Departement 7

2. tcp_mss_max

3. getting environment variables from c shell using Bourne shell

4. numerical ip adress

5. Light Speed Bourne Shell! (was: Bourne shell tricks)

6. Need Epson Stylus 600 printer driver

7. Bourne Shell compatible shells (was: Request: which shells)

8. openlook

9. best korn shell resources and is there a korn shell faq

10. c-shell script won't run from korn-shell / SETUID

11. Running a Bourne Shell daemon from a C shell(HELP?)

12. nohup (from Bourne shell)

13. Korn/Bourne shell return code precision