Skip to content

A simple c-shell for Linux for a deeper exploration of what can be done at the metal.

License

Notifications You must be signed in to change notification settings

cartheur/c-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c-shell

Simple and well-commented shell written in C for Linux. For exploration deeper into the metal.

Features

  • Basic commands: exit, pwd, clear and cd
  • Environment management with setenv and unsetenv
  • Program invocation with forking and child processes
  • I/O redirection (use of dup2 system call) limited to the following:
    <cmd> <args> > <output>
    <cmd> <args> < <input> > <output>
  • Background execution of programs with &
  • Piping implemented (<cmd1> | <cmd2>) via pipe and dup2 syscalls. Multiple piping is allowed.
  • SIGINT signal when Ctrl-C is pressed (shell is not exited)

Building (linux)

  • Run make at the root directory then ./c-shell to start the shell.

About

A simple c-shell for Linux for a deeper exploration of what can be done at the metal.

Topics

Resources

License

Stars

Watchers

Forks