Skip to content

ozhi/mybash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

mybash

A basic command interpreter that executes bash commands. Written in C, using OS primitive calls like read, fork and exec.

Reads commands from stdin, parses them and their arguments and executes them in a new OS process.

Also has support for background mode. sleep 2 & sleeps for two seconds but lets you enter a new command immediately.

Try it out

./compile-run
Compilation successful.
Running...

mybash> ls
mybash mybash.c README.md

mybash> echo some string arguments
some string arguments

mybash> cat no-such-file
cat: no-such-file: No such file or directory

mybash> hfgh
Command hfgh not found

mybash> sleep 2 &

mybash>bye
bye

About

A basic command interpreter.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages