10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
So i am trying to read in file
readFile <GivenFile> modFile
looking for a regular file under the directories in the GivenFile and print them out is my over all goal.
basically I am looking for anything that looks like a directory in the given file and printing it out.
Since I am trying to do... (2 Replies)
Discussion started by: squidGreen
2 Replies
2. UNIX for Advanced & Expert Users
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)
Discussion started by: alister
9 Replies
3. Shell Programming and Scripting
I have a problem that when I run my script with no arguments I get the error
argv: Subscript out of range.
#!/bin/csh
set rdir = "/uniprg/chrisd/radon/trunk-radon/fradon/source-frt/new-frt"
if ($#argv == 0) then
echo "no arguments passed to radon3d-linear.com"
... (0 Replies)
Discussion started by: kristinu
0 Replies
4. Programming
when i run my program, i have a parameter, that i want to set the value to another string
i am using
int main(int argc, char **argv) {
char my_str=argv;
printf("%s",my_str);
return 0;
}
and i get
Segmentation fault
ran using
./my_prog /usr/share/dict/words hello1
... (2 Replies)
Discussion started by: omega666
2 Replies
5. Programming
Hi,
Can somehelp help how to list file in a dir? (5 Replies)
Discussion started by: Learnerabc
5 Replies
6. Shell Programming and Scripting
I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them)
Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Discussion started by: pollsizer
1 Replies
7. Shell Programming and Scripting
this is in one of my scripts...
if ($#argv == 0) then
echo 'blah bla'
exit 0
endif
I want it to be something like this...
if ($#argv == 0 OR $argv >=3)
echo 'blah bla'
exit 0
endif
so when the arguments are none, or greater than three I want this "if then" to take over. how? I... (5 Replies)
Discussion started by: ajp7701
5 Replies
8. Programming
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)
Discussion started by: return_user
5 Replies
9. Programming
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)
Discussion started by: Akeson Chihiro
4 Replies
10. Programming
I have a program which I wish to modify. It used to be run from the command line, but now I wish to change this so it can be used as a function.
The program has complex argument processing so I want to pass my paramters to as if it were being called by the OS as a program.
I have tried to... (2 Replies)
Discussion started by: mbb
2 Replies