Quote:
Originally Posted by ankur0921
Can anybody put some light on the percentage usage of shell scipt / linux command usage in c program via system() function ?
|
My guess is that it is about 0.
If you can do some task with a shell script, there is no point in wrapping it in a C program. It is much simpler to directly call the shell script instead.
You drop down to a regular programming language only when you cannot express something in a higher level language. Since programming it in a low level language is more work, you do as little as possible there, and use a high level scripting language to glue all pieces together.
I am not much of a fan of shell scripting for anything beyond a simple sequence of commands, I tend to switch to Python instead, which is much easier to program than C.
Quote:
Originally Posted by ankur0921
Is it feasible to use shell script / linux command n c program ?
|
Feasible? Sure it is, just use system() in C, but I don't see why you'd do this in the first place.
Quote:
Originally Posted by ankur0921
Can anybody provide some referene / standard on shell script / linux command usage with c ?
|
Like 'man system' ?