SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : LINUX -- Ignore unavailable to you. Want to Upgrade?


To: Babu Arunachalam who wrote (2205)4/6/2000 12:58:00 AM
From: JC Jaros  Respond to of 2615
 
Babu- Try clicking on news:comp.unix.shell or entering it in your browser's URL typerupperthing. Surely someone will be able to answer your question there. -JCJ



To: Babu Arunachalam who wrote (2205)4/6/2000 7:35:00 PM
From: Mitch Blevins  Read Replies (1) | Respond to of 2615
 
You can't get there directly. You cannot call C functions
directly from a bourne shell.

Instead, compile a small C-program that passes thru your
string from the command line (and hence, also from bourne).

main(int argv, char** argv) {
/* omitting error checking */

the_c_function_i_wanted_to_call(argv[1]);

}

Compile this program, and move it to your /usr/local/bin.
From there, you can call it from a shell.

Another alternative is to use perl or python instead, and
recompile them to include your C-function in a custom
module.

-Mitch



To: Babu Arunachalam who wrote (2205)4/6/2000 10:06:00 PM
From: E. Charters  Read Replies (1) | Respond to of 2615
 
main()

CDECL outside_functions_that_does_something_I_want( ).

outside_etc(do something outside); # see prototype

duh -uh I dunno. gotta look it up.

did you ever try 'man shell scripts' or something like that?

EC<:-}