• Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created almost 12 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Linux shell written in C. Simple but functional and thoroughly commented, just for educational purposes.

simple-c-shell

Simple and thoroughly commented shell written in C, just for educative purposes.

Created by Juan Manuel Reyes as an University exercise, and released under GPLv3.

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)