Skip to content

theTropicalBoi/holbertonschool-simple_shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creating a Simple Shell in C

Explore the importance of a shell in a OS and learn how to create a simple shell using system call in C.


Tech Stack:

Requirement:

  • Environment: Ubuntu 24.04 LTS
  • GNU Compiler Collection: GCC 14.02
  • Coding Style Checker: Betty

Compilation Command:

Using Ubuntu 24.04 LTS to compile the program using gcc, with the option -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh.

Testing:

Your shell should work like this in interactive mode:

user@ubuntu:/# ./hsh
($) /bin/ls
hsh main.c shell.c
($)
($) exit
user@ubuntu:/#

But also in non-interactive mode:

user@ubuntu:/# echo "/bin/ls" | ./hsh
hsh main.c shell.c test_ls_2
user@ubuntu:/# cat test_ls_2
/bin/ls
/bin/ls
user@ubuntu:/# cat test_ls_2 | ./hsh
hsh main.c shell.c test_ls_2
hsh main.c shell.c test_ls_2
user@ubuntu:/#

Flowchart:

Authors:

About

Create a simple shell using system call in C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages