Reinhard Doelz doelz at comp.bioz.unibas.ch
Fri Sep 3 01:25:35 EST 1993


In article <9309030123.AA03088 at gcrc.scripps.edu>, yagi2 at SCRIPPS.EDU (Akemi Yagi/BCR7 4-8094) writes:
...
|> I have a question regarding C programming on UNIX.  A call to the function
|> system() allows a program to execute a shell command.  However, system
|> invokes sh but not csh.  As a result it cannot execute a command which
...

======================test.c
#include "stdio.h"
main()
{ 
        char string[90]; 
        sprintf (string,"/bin/csh test.csh\n"); 
        printf (" Executing %s\n", string); 
        system(string); 
} 

======================test.csh 
#!/bin/csh

alias

====================


% test 
Executing /bin/csh test.csh

h       history
ls 	ls -C 



Be aware, in VMS it's a bit more tricky. 



-- 
+----------------------------------+-------------------------------------+
|    Dr. Reinhard Doelz            | RFC     doelz at urz.unibas.ch         |
|      Biocomputing                | DECNET  20579::48130::doelz         |
|Biozentrum der Universitaet       | X25     022846211142036::doelz      |
|   Klingelbergstrasse 70          | FAX     x41 61 261- 6760 or 267- 2078     
|     CH 4056 Basel                | TEL     x41 61 267- 2076 or 2247    |   
+------------- bioftp.unibas.ch is the SWISS EMBnet node ----------------+
                     ftp mirror at nic.switch.ch 
               -----------------------------------------




More information about the Bio-soft mailing list