It supports the following commands:
-
The internal shell command "exit" which terminates the shell
-
A command with no arguments * Example: ls, cd, …etc
-
A command with arguments * Example: ls –l
-
A command, with or without arguments, executed in the background using &. * Example: firefox &
-
Shell builtin commands * Commands: cd & echo * Details: for the case of:
- cd: It covers all the following cases (assume no spaces in path):
- cd
- cd ~
- cd ..
- cd absolute_path
- cd relative_path_to_current_working_directory
- echo: Prints the input after evaluating all experessions (assume input to echo must be within double quotations).
- echo "wow" => wow
- export x=5
- echo "Hello $x" => Hello 5
- cd: It covers all the following cases (assume no spaces in path):
6. Expression evaluation
- Commands: export
- Example:
- export x=-l
- ls $x => Will perform ls -l
- export y="Hello world"
- echo "$y" => Hello world
- Example:
- Download the code and run the following command in the terminal make ./shell