I searched on the forums. No advises.
I am using a previous source code. I changed the main function main(int argc, char **argv) in a function misc(int argc, char **argv). How do you use the argc and argv parameters? This is how I am calling the function :
char param;
strcat(param,"wgrib ");... (4 Replies)
hello
does anyone knows how can i reach a parameter in awk command line
for example
p1 f 4
p1 is an awk script. 4 is parameter
i want to work with the second parameter
i know it has something to do with argv command
i just dont know the syntax.
please help. (1 Reply)
Is it possible to use the dbx debugger with the CL options for the executable ?
Say you have created a executable called myfunc which can take string arguments at run-time. You run it like this
./myfunc Hello World
where Hello and World are the string arguments
My question is whether... (1 Reply)
Hi C experts,
I have the following code for adding command line option for a program
int main (argc, argv)
int argc;
char *argv;
{
char *mem_type; //memory type
char *name; //name of the memory
int addr; //address bits
int data; ... (5 Replies)
mode=$1
psg telnetd | awk current=`date +%M`'{
printf ("mode is %s",mode)
printf ("mode is %s",ARGV)
}'
at command prompt when i run the script along with the argument i get only--
'mode is '
argument is not printed.(If the argument is... (3 Replies)
Hello All,
First post. I've been struggling with the following:
Given a char* string, I need to construct an "int argc, char *argv" style structure. What I'm struggling with most is handling escaped-whitespace and quotes.
e.g. the string:
char *s = "hello world 'my name is simon'... (10 Replies)
Hi Folks,
I've prepared a shell script that takes action based on arguments and number of arguments..sample code like:
ARGV=("$@")
ARGC=("$#")
case ${ARGV} in
abc)
if ; then
......
else
printf "\nInvalid number of arguments, please check the inputs and... (2 Replies)
I have written this code in an awk script.
BEGIN {
print "ARGV", ARGV
if ( match(ARGV,/-u/) || match(ARGV,/--usg/) ) {
print "MATCH -u:",match(ARGV,/-u/), RSTART, RLENGTH
print "MATCH --usg:",match(ARGV,/--usg/), RSTART, RLENGTH
usage()
exit(1)
}
}
I want... (7 Replies)
All of my machines (various open source derivatives on x86 and amd64) store argv above the stack (at a higher memory address). I am curious to learn if any systems store argv below the stack (at a lower memory address).
I am particularly interested in proprietary Unices, such as Solaris, HP-UX,... (9 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
First, create a "hello world" program that prints "Hello World". But NOW, instead use argc to verify that a... (9 Replies)