08-05-2005
invoking an Unix script from a C Program
How to invoke an Unix Script from C program?
(or)
How to invoke another C program from a C program?
thanks
Karthik
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Here's a shell script snippet.....
cd $ORACLE_HOME/bin
Retval=`sqlplus -s <<eof
$TPDB_USER/april@$TPD_DBCONN
whenever SQLERROR exit 2 rollback
whenever OSERROR exit 3 rollback
set serveroutput on
set pages 999
var status_desc char(200)
var status_code... (1 Reply)
Discussion started by: hidnana
1 Replies
2. Shell Programming and Scripting
Hello All,
I have a shell script A which is in one unix box. Also i have a script B in another unix box. Now i'm struggling to find a way to invoke A shell script from B shell script. Is it possible to do this in any way..Request you anybody please help me in this point.
Thanks in advance. (6 Replies)
Discussion started by: RSC1985
6 Replies
3. UNIX for Advanced & Expert Users
hi
i want to invoke a unix script in a C program and also return some value from the script to the C program to use that value further.
Basically i am doing a Lookup operation in this unix script and returning the looked up data from a oracle database table..
please help me invoke as well... (1 Reply)
Discussion started by: somi2yoga
1 Replies
4. Shell Programming and Scripting
In the following script, I wish to invoke a compiled C++ program, consimv4 and pass it some command line arguments through the shell script's command line arguments and variables. But for some reason, when I run the script, I just return to the shell prompt and nothing happens. For the life of me,... (7 Replies)
Discussion started by: msaqib
7 Replies
5. UNIX for Dummies Questions & Answers
I have a program R installed on Ubuntu under /usr/bin/R. I also have a different version installed under /home/user/R. I would like to invoke the locally installed program temporarily. How can I do this automatically by running a script and then switching to the default program?
thanks,
SM (2 Replies)
Discussion started by: smeme
2 Replies
6. Shell Programming and Scripting
I am new to Unix. Could some tell me what are all the possible ways of invoking/executing a script, doesnt matter which shell you are in. Thanks (4 Replies)
Discussion started by: bobby1015
4 Replies
7. UNIX and Linux Applications
I want to post an XML message to a http url from my unix shell script. I have already tried using CURL and XDG-OPEN commands but these commands have to be installed separately, which is not possible at my end.
Please suggest a way forward. (0 Replies)
Discussion started by: MeghaKhanna
0 Replies
8. UNIX for Dummies Questions & Answers
Hi, I have lost a lot of hours by looking for answer but without results.. My problem is that:
I use Debian GNU/Linux and I want to configure cron in order to run rtorrent every day between 24.00 and 09.00. That part I have achieved, but I couldn't forced cron to make it visible on any of my... (10 Replies)
Discussion started by: juru_piotr
10 Replies
9. UNIX for Dummies Questions & Answers
hi all,
is there a way to run a script upon invoking an application . for eg if i click on mozilla i want a script to run , before runniing mozilla , maybe ask a password or something only then open mozilla (2 Replies)
Discussion started by: mithun1!
2 Replies
10. Shell Programming and Scripting
I would like to invoke a procedure in SQL server which will return some results of a select query from UNIX script. I would like to invoke this procedure and load the data into a flat file in UNIX.
Can you please help? I am not able to find any sample programs in Internet. (1 Reply)
Discussion started by: madhu.sushmitha
1 Replies
LEARN ABOUT OPENSOLARIS
program_invocation_short_name
INVOCATION_NAME(3) Linux Programmer's Manual INVOCATION_NAME(3)
NAME
program_invocation_name, program_invocation_short_name - obtain name used to invoke calling program
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <errno.h>
extern char *program_invocation_name;
extern char *program_invocation_short_name;
DESCRIPTION
program_invocation_name contains the name that was used to invoke the calling program. This is the same as the value of argv[0] in main(),
with the difference that the scope of program_invocation_name is global.
program_invocation_short_name contains the basename component of name that was used to invoke the calling program. That is, it is the same
value as program_invocation_name, with all text up to and including the final slash (/), if any, removed.
These variables are automatically initialized by the glibc run-time startup code.
CONFORMING TO
These variables are GNU extensions, and should not be used in programs intended to be portable.
NOTES
The Linux-specific /proc/[number]/cmdline file provides access to similar information.
SEE ALSO
proc(5)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU
2017-09-15 INVOCATION_NAME(3)