From the original post, it's not clear if you're asking:
- how to use the shell program, like ksh, bash, or cmd?
- how to use command line utilities, like grep, ls, cat?
- how to write a C++ program that uses command line arguments.
Shells and shell programs are wonderful things. You can create a simple script in no time. Of course, you need some knowledge of the command line utilities too. A key enabler here is pipes. They are truly wonderful things.
As for the command line, learn and use getopt(). It will make your command line programs behave like the OS ones.