Example usage for the common "ls" command:
-
compile the code:
g++ shell.cpp -o shell
-
run the shell:
./shell
-
type the absolute path for the unix command you want to use:
/bin/ls
-
You can also put options on the commands like so:
/bin/ls -l
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Example usage for the common "ls" command:
compile the code:
g++ shell.cpp -o shell run the shell:
./shelltype the absolute path for the unix command you want to use:
/bin/lsYou can also put options on the commands like so:
/bin/ls -l