Skip to content

lilacyl/myShell

Repository files navigation

myShell

As the name suggests, this project is a command-line shell. This shell allows for multiple processes to be run simultaneously in the foreground and in the background. If you are ever tired of your laptop’s terminal feel free to download this one! Follow the setup instructions here.

Here is a list of functionalities my shell can perform:

  • Basic commands
    • ls
    • exit
    • touch <filename>
    • rm <filename>
    • cd <path>
    • echo <string>
    • make
    • ./<executable>
    • !history: print out each command in the history
    • #<n>: print and executes the n-th command in history
    • !<prefic>: print and executes the most recent command
    • Ps: print information about all currently executing processes
  • Logical operators for commands
    • &&: And
    • ||: Or
    • ;: Separator
  • Redirection commands
    • '>': Output the command into a file
    • '>>': Append the output of a command into a file
    • '<': Input the content of a file as the input args of a command.
  • Background external commands: <command>&
    Command ending with “&” will be run as a background process
  • Signal commands
    • Ctrl+C: (SIGINT) kill the currently running foreground
    • kill <pid>: (SIGKILL) kill a specifid process with pid
    • stop <pid>: (SIGSTOP) stop of prcoess with pid
    • cont <pid>: (SIGCONT) continue a process with pid
  • History: ./shell -h <filename>
    • Storing and displaying the history of commands executed across shell sessions
    • Clear history (currently implementing)
  • Run commands from a script file: ./shell -f <filename>

Video explanation of my shell: (in the process of making…)

Implementation & more details

I have implemented this project using C.

** Setup instructions**

After forking and cloning this project, in a terminal navigate to the myShell folder. Type:

  1. “make” to make the shell executable
  2. “./shell” to run this sell
  3. “make clean” to delete all of the object files and the shell executable

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published