Skip to content

a-qxin/simple-c-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

simple-c-shell

Simple Linux shell in C that reads, parses, then executes simple shell commands.

fork() creates new processes, execvp() executes commands.

CLONE

Clone this repo to your local machine using

git clone https://github.com/a-qxin/csc415.git

SETUP/RUN

gcc -o shell shell.c

./shell

Use like any shell.

Examples: ls, pwd, mkdir <new folder name>

CTRL-C to quit.


RESOURCES USED

vim/C basics

print in c

argc, argv, etc

fgets()

fgets() 2

shell in C using fork() and execvp()

shell in C using fork() and execvp() 2

POSIX exec function family

(char*)0 vs. NULL

execvp()

exit status 256

exit status 256 with WEXITSTATUS

documentation, as always

markdown cheatsheet for readme formatting

About

simple linux C shell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages