Please mention command or sample code to call c function from shell script .
5 Answers
Python ctypes can be used to load native libraries and call functions that follow standard calling conventions. So if Python is available, one can do something like:
python -c "import ctypes;ctypes.CDLL('libc.so.6').puts('Hello from libC.')"
Comments
Alternatively you can use this approach:
http://www.unix.com/shell-programming-scripting/51226-calling-c-function-froma-shell-script.html