I make a shell that takes arguments in a command line with special conditions on what it is able to do.
For example, anything that appears after the
# character will be considered as a comment and the rest of the command line is rendered negligible.
Such as in the command
ls -lR /, you would execute the program
/bin/ls (performed using
execvp) passing into it the parameters
But in the command
ls # -lR /, only
/bin/ls will run.
I have already made the parsing function that will tokenize command line into strings of separate arguments so I figured it would start from there.
However, I'm not sure how I would go about commenting out everything else after the
# character in the CLI. I am using C++.