public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: source command
       [not found] <38198324.4F44C6B5@iigb.na.cnr.it>
@ 1999-11-10  0:09 ` M. Tavasti
  1999-11-30 23:28   ` M. Tavasti
  0 siblings, 1 reply; 2+ messages in thread
From: M. Tavasti @ 1999-11-10  0:09 UTC (permalink / raw)
  To: help-gcc

Claudia Rallo <rallo@iigb.na.cnr.it> writes:

> How I can call a unix built-in unix command (like source) in a c
> program?

Do you mean shell built-in command? 

For exsmaple, bash/tcsh 'source' reads commands from file, and runs
them without making new shell, mostly used to read some settings
(.profile etc). In C-program this ain't making sense. So, neearest
thing to do is like:

system("/bin/sh myscript.sh");

Probably I'm missing your point...

-- 
 (Edeltava teksti ei tainnut sisaltaa skandeja, oikeinkirjoitusta tai asiaa)
    M. Tavasti      | Puh.             | Mahdolliset mielipiteet varastettu,
tavasti@iki.fixx    |     040-5078254  | lainattu, muitten tai jopa omia!
    (Poista tupla-x mail-osoitteesta. Remove double-x from mail address)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: source command
  1999-11-10  0:09 ` source command M. Tavasti
@ 1999-11-30 23:28   ` M. Tavasti
  0 siblings, 0 replies; 2+ messages in thread
From: M. Tavasti @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

Claudia Rallo <rallo@iigb.na.cnr.it> writes:

> How I can call a unix built-in unix command (like source) in a c
> program?

Do you mean shell built-in command? 

For exsmaple, bash/tcsh 'source' reads commands from file, and runs
them without making new shell, mostly used to read some settings
(.profile etc). In C-program this ain't making sense. So, neearest
thing to do is like:

system("/bin/sh myscript.sh");

Probably I'm missing your point...

-- 
 (Edeltava teksti ei tainnut sisaltaa skandeja, oikeinkirjoitusta tai asiaa)
    M. Tavasti      | Puh.             | Mahdolliset mielipiteet varastettu,
tavasti@iki.fixx    |     040-5078254  | lainattu, muitten tai jopa omia!
    (Poista tupla-x mail-osoitteesta. Remove double-x from mail address)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-30 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <38198324.4F44C6B5@iigb.na.cnr.it>
1999-11-10  0:09 ` source command M. Tavasti
1999-11-30 23:28   ` M. Tavasti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).