Atlas-simple_shell is a basic terminal shell that allows users to interact with the file system and execute commands. Inspired by the Teenage Mutant Ninja Turtles, it provides a simple command-line interface for listing commands and files, making it easy to navigate your computer's directory like a ninja in the sewers of New York City.
To build and use Atlas-simple_shell, follow these steps:
git clone https://github.com/yourusername/atlas-simple_shell.git
cd atlas-simple_shell
gcc -Wall -Werror -Wextra -pedantic -std=gnu89 main.c prompt.c execute.c -o hsh
Copy code
./hsh
Copy code
$ ./hsh
($) /bin/ls
hsh main.c shell.c
($)
($) exit
$
You can also use the shell in non-interactive mode by piping commands to it:
Copy code
echo "/bin/ls" | ./hsh
hsh main.c shell.c
Or by redirecting input from a file:
Copy code
$ cat test_ls_2
/bin/ls
/bin/ls
$ cat test_ls_2 | ./hsh
hsh main.c shell.c
hsh main.c shell.c
Here are some example commands you can run in Atlas-simple_shell:
Copy code
($) /bin/pwd
/home/username/atlas-simple_shell
($) /bin/echo "Cowabunga!"
Cowabunga!
($) /bin/ls -l
total 24
-rw-r--r-- 1 username username 1234 Jul 23 12:34 main.c
-rw-r--r-- 1 username username 5678 Jul 23 12:34 prompt.c
-rw-r--r-- 1 username username 9101 Jul 23 12:34 execute.c
($) exit
The following built-in commands are available in Atlas-simple_shell:
exit: Exit the shell.
The project contains the following files:
main.c: Contains the main loop of the shell, reading input and handling the execution of commands.
prompt.c: Contains the function that displays the shell prompt.
execute.c: Contains the function that executes the given commands.
shell.h: Header file containing necessary includes and function prototypes.
If you'd like to contribute to this project (we love help from fellow ninjas!), please fork the repository and submit a pull request. Contributions can include:
Bug fixes
New features
Improved documentation
Code optimization
This project is licensed under the MIT License. See the LICENSE file for more details.
Teenage Mutant Ninja Turtles: For their endless inspiration. Open-source community: For their invaluable resources and support. You: For using and contributing to Atlas-simple_shell. Cowabunga, dude! 🐢🍕