From: Bernd S. <ber...@in...> - 2007-07-28 19:27:47
|
At 28 Jul 2007 19:47:05 +0100, Colin Paul Adams wrote: > > >>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> I think that the shell script is invoked by using C's > Eric> 'system'. Something like: > > Eric> system("/path/to/gec.sh") > > Eric> So, do you think that calling: > > Eric> system("sh /path/to_gec.sh") > > Eric> would work? Or should I write: > > Yes. > > Eric> system("/bin/sh /path/to_gec.sh") > > Eric> (in case 'sh' was not the in the path, or aliased to > Eric> something else)? > > Sh should always be in the path. On Linux it is nearly always a > symbolic link to /bin/bash (it is here). > So I don't think it matters. /bin/sh is safest, I guess. I can confirm that 'sh' should always be in the path on a Unix system, so just calling 'sh <script>' should always work. I am saying "should" as there are some very strange Unix systems out there ... ;-) Bernd |