View Single Post
Old 12-20-2004, 12:30 PM   #26 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,720
redhead is on a distinguished road
If you compile the program you'd get an executable.
when executing this in a terminal/command prompt, you can chose to just type in the executables name or the executables name followed by something else.
If you just type in the executable the program should return with a warning that it isn't properly used, and should be given an argument telling it what .state in the filenames to look for.
this argument is the thing you can chose to write after the executables name uppon executing it.
In windows you could start a command prompt and type in notepad, this will open up notepad for you, if you have a file called my_file.txt you can type notepad my_file.txt and notepad will open, showing the contence of my_file.txt.
The name my_file.txt is called the first agument given to notepad uppon execution.
In this case with my code, it expects to be given this first argument.
This argument should be the .state to look for, if you don't want to look for it in the current directory (the directory in which you are located when you type in the executable name in order to execute it) then give this as a second argument ie:
Quote:
/my/dir > my_executable .state
will make it search in /my/dir, showing any files which ends in .state
/my/dir > my_executable .state /some/other/dir
will make it search in /some/other/dir, showing any files which ends in .state
Does this make it any more clear ??

The way I write it with <> and [] surrounding it, is the way man pages under linux explains it, given that anything within <> is required, and anything within [] is optional.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote