Skip to content

Hexcles/simple-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myshell

A simple Linux shell writen in C to play with system calls.

By Robert Hongpu Ma, as a homework assignment for SFU CMPT300 (Steven Pearce).

Features

  • GNU readline (auto completion, history, line edit, etc.).
  • Show current date and time as prompt.
  • External program invocation (with PATH finding and arguments support).
  • Change working directory ( cd command, with cd and cd ~ HOME shortcut support).
  • Correctly handle CTRL-C (SIGINT) and CTRL-D (EOF) (same behaviour as Bash).
  • Deal with possible errors for system calls.

Techniques (library, system calls, etc.)

  • flex
  • readline
  • signal
  • setjmp
  • fork, execvp, waitpid
  • time, localtime, strftime
  • errno, perror

How to use

make
./myshell

About

A simple Linux shell (OS course work)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages