Re: App blueprint, advice please!



On Mon, 17 Dec 2007 08:52:11 -0500
Patrick <optomatic rogers com> wrote:

So as Dan was saying, I can launch other programs written in other 
languages from system() function calls. So I could link lots of
them together regardless of language they are written in and if I
really needed to I could still access Bash commands like ssh,
netcat right?

Those aren't "bash commands" -- they are other programs! All those things that you seem to think of as part 
of bash (cp, ls, rm, ftp, ssh, nc, tar, sed, gzip etc.) are in fact all external programs. The difference 
between "shell" languages and other languages is that shells typically interpret all commands as external 
programs to be started, with the exception of the few truly builtin commands (see the section BUILTIN 
COMMANDS) in the bash man page.

So to start another program from bash, just write it on a single line.

To start another program from C or Perl, just wrap it into a system() function call.

Ruby and Python will have similar functions, but I don't know them.

--D.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]