Skip to content
/ C-Shell Public

A shell written in C to imitate linux terminal that takes in semicolon-separated commands

License

Notifications You must be signed in to change notification settings

Kira49/C-Shell

Repository files navigation

C-Shell

assignment:(

Description

This is a shell designed to run like a linux terminal written in C. Semicolon separated commands are taken as inputs, parsed, and executed. Certain commands like ls, pwd, cd, pinfo, echo are inbuilt, and the remaining are executed using execvp command. Implementation is majorly done using stat and dirent. Background processes are also handled

To run

$ make
$ ./shell

To exit

$ quit

Unusual commands

jobs

Displays all ruinning jobs

$ jobs

kjob

Kills a specified job

$ kjob [job id] [signal]

overkill

Kills all running jobs

$ overkill

fg

Continues a suspended background process identified by Job ID as a foreground process

$ fg [job id]

bg

Continues a suspended background process identified by Job ID jid as a background process

$ bg [job id]

pinfo

Takes a process ID as input and provides information about the process. If no arguments given, it provides information about the shell process running

$ pinfo [pid]

;-;

Has been made colorful to mimic your terminal to make it feel more usable

bonus

:( if prev command executed with an error, else :) before prompt. Previous working directory has been implemented. Use as:

$ cd -

About

A shell written in C to imitate linux terminal that takes in semicolon-separated commands

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published