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.