An enhanced custom shell with variable support and I/O redirection.
SimpleShell v1.5 is an enhanced version of our minimal shell interpreter.
Now featuring:
✅ Variable management (set/get commands)
✅ I/O redirection (> and < operators)
✅ Variable expansion in echo commands
Maintains all previous functionality while adding powerful new features.
| 🔧 Command | 📝 Description |
|---|---|
help |
List all available commands |
pwd |
Show current working directory |
echo |
Print arguments (supports $var expansion) |
exit |
Exit the shell |
set |
Set variable (name=value syntax) |
get |
Get variable value |
Use $var_name in echo commands to display variable values:
$ set name=Alice
$ echo Hello $name!
Hello Alice!Redirect output with > and input with <:
$ echo "File content" > output.txt # Write to file
$ cat < input.txt # Read from filegcc shell.c -o shell
./shell$ help
Available commands:
exit Exit the shell
pwd Print current directory
echo Print arguments
help Show this help message
set Set variable (name=value)
get Get variable value
$ set message="Hello World"
$ get message
message=Hello World
$ echo $message > greeting.txt
$ cat < greeting.txt
Hello World
$ echo "Current directory:" && pwd
Current directory:
/home/user/simpleshell
$ invalid_cmd
Command not found: invalid_cmd
$ exit