GETARG(3F)GETARG(3F)NAME
getarg, iargc - return command line arguments
SYNOPSIS
subroutine getarg (k, arg)
character*(*) arg
function iargc ()
DESCRIPTION
A call to getarg will return the kth command line argument in character string arg. The 0th argument is the command name.
Iargc returns the index of the last command line argument.
FILES
/usr/lib/libU77.a
SEE ALSO getenv(3F), execve(2)4th Berkeley Distribution May 15, 1985 GETARG(3F)
Can I do it like this?
if (strcmp(argv, "history")==0)
{
argv = "10";
execvp(argc,argv);
}
actually, it doesn't work,
How can I modify it?
Thanks (17 Replies)
we are having two servers that are running on Solaris 5.6
the server A communicates with the server B through the CMIS protocol
a process known as CMIS_STACK runs on the servers for communication between them.
now we tried shifting the server A to a fallback server A1 when the database... (2 Replies)
Hi,
I'm porting some old C++ code (that I didn't write) from Linux to AIX and have run into a problem in getting the process name from within the code when it is run on AIX. Basically the code is getting the process name so it can then return it to the rest of the code as argv. This code is trying... (1 Reply)
Hi there,
So im having a bit of trouble here finishing up a program that involves the use of piping various unix commands in c. To be exact, I am struggling with how to make the redirect operator work.
Essentially the program it self will run a bunch of piped commands in c. For example you... (2 Replies)
Hi,
Not sure if this post belongs to this forum but I have been trying every so often to setup a simple http server in awk. After a couple of try and errors I finally came across this:
REMCONF - TCP/IP Internetworking With `gawk'
This tutorial is not to cut and paste without change, so here... (0 Replies)
Hello everyone,
I'm trying since a few days to compile a f90 program with gfortran (on Ubuntu) with a makefile. The fortran program calls 2 routines written in C.
Here is my makefile:
FC = gfortran
SFC = gfortran
FFLAGS = -ffree-form -O... (21 Replies)
Hello,
So I have approximately 300 files of raw data (.txt) files that I am using to perform statistical analysis. I have been able to construct a Fortran program that is able to perform my statistical analysis on a file by file basis.
However, I now want to be able to loop program through... (19 Replies)
Hello All,
I want to replace a value of a string in a file on all the remote systems. The file is /opt/adapter/Adapter/snmp/conf/snmpd.conf and the parameter to be replaces if "rocommunity" for which current value is "public" and wish to change it to "sp1der".
i did trying it through sed, but... (4 Replies)
Anyway, i'm writing a shell script and i read in input with the following:
read $foo
i now want to use this variable in my sed string replacement like so:
sed -i 's/replaceme/$foo' myfile.txt
What i'm getting instead is the literal substitution not what $foo actually equals.... (11 Replies)
Dear mentors, I just need little explanation regarding for loop to give input to awk script
for file in `ls *.txt |sort -t"_" -k2n,2`; do
awk script $file
done
which sorts file in order, and will input one after another file in order to awk script
suppose if I have to input 2 or... (4 Replies)
Hello! :)
I currently got the task of programming a UNIX Shell for practice. The functionality is as follows:
1. Entering commands with the keyboard. Enter stops the input and creates a process which should start any program
2. the shell waits for termination of each command before... (1 Reply)
1. The problem statement, all variables and given/known data:
Hello! :)
I currently got the task of programming a UNIX Shell for practice. The functionality is as follows:
1. Entering commands with the keyboard. Enter stops the input and creates a process which should start any program
2.... (0 Replies)