The UNIX and Linux Forums  

Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-28-2008
jisha jisha is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 144
Arrow A solution for Calling a C-function froma shell script

Hi,
I have searched the forum for the query, But i didnt find an exact answer.

I have a script(1.sh) and a c program(sample.c)
sample.c contains many function definitions.( run(), find(), add() etc).
I want to call functions in sample.c from 1.sh and use the return value in 1.sh
********************
1.sh

echo "this is sample"
.....
.....
find("nomber")
....
....
*********************

sample.c

main()
{
find()
{
....
.....
}

add()
{
....
....
}



}


Thanks in advance
Js

Last edited by jisha; 01-28-2008 at 04:59 AM.. Reason: I found the answer