You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to the Hogwarts Shell, a simple command-line interface inspired by the magical world of Harry Potter. This shell supports various commands to mimic a basic Unix shell environment with a touch of wizardry. Below is a guide to help you get started with the Hogwarts Shell, including its commands, functionalities, and how to use it.
Table of Contents
Features
- Redirection
- pipelining
Commands
- lineage
- mirror
- geminio
- mobiliarbus
- voldemort
- diary
- apparition
- school
- revelio
- showme
- tempus
- All External commands
Installation
Usage
Customization
Features
Custom Command Set: Execute magical commands to interact with files and directories.
Help System: Access command usage information.
Friendly Messages: Enjoy welcoming and exit messages with a magical touch.
Commands
"lineage" :
Displays the current working directory.
Outputs the absolute path of the current working directory .
lineage = pwd
Usage :
lineage
"mirror" :
Echoes the provided arguments.
Prints the given text to the terminal. If no text is provided, it prints an empty line.
mirror = echo
Usage :
mirror <string>
"geminio" :
Copies a file from the source to the destination.
Copies the file specified by to the path specified by . If any errors occur (e.g., file not found), they are reported.
geminio = cp
Usage :
geminio <Source> <Destination>
"mobiliarbus" :
Moves a file from the source to the destination.
Moves the file specified by to the path specified by . If any errors occur, they are reported.
mobiliarbus = mv
Usage :
mobiliarbus <Source> <Destination>
"apparition" :
Used to change directories.
This command will take you to the 'Documents' directory by its PATH.
apparition = cd
Usage :
apparition </path/>
"school" :
Find the type of command if its Internal or External .
Describes how its arguments would be interpreted if used as command names.
school = type
Usage :
school <command>
"revelio" :
Print all Enviroment Variables .
Allows you to display your current environment or run a specified command in a changed environment.
revelio = env
Usage :
revelio
"voldemort" :
Exits the shell with a custom message.
Prints a special exit message and terminates the shell.
voldemort = exit
Usage :
voldemort
"diary" :
Displays help information for each command.
Provides a brief overview and usage instructions for each available command.
diary = help
Usage :
diarydiary <Commend Name>
"showme" :
Displays help information for each command.
Allows you to check for memory RAM on your system or to check the memory statics of the Linux operating system.
showme = free
Usage :
showme
"tempus" :
Displays help information for each command.
Displays the current time, the system's uptime, the number of users,.
tempus = uptime
Usage :
tempus
External Commands :
all External Commands With them real names and Definitions .
Once you have the shell running, you can start typing commands at the HOGWARTS---> prompt. Use the commands listed above to interact with the shell. For example, you can use lineage to see your current directory, mirror to print text, and geminio to copy files.
Customization
You can customize the shell by modifying the source code. Here are some points where you might want to make changes:
Welcome Message: Modify the print_welcome_message function in main.c to change the shell's startup message.
Exit Message: Customize the execute_voldemort function to change the exit message.
Command Implementations: Update or add new commands by editing or adding new .c and .h files.
Troubleshooting
The SPELL not recognized ( Command Not Recognized ) : Ensure the command is correctly typed and listed in the commands array in main.c.
File Errors: Check file paths and permissions when using geminio and mobiliarbus.
Compilation Issues: Ensure all required files are included and that you are using a compatible compiler.