This is a Linux/Unix-like shell implemented in C. This shell supports 3 internal and 5 external commands with various options, executed via fork/exec
or pthread/system
function calls based on the user's preference. Commands can be run in parallel using threads, making this shell very efficient.
-n
: No newline after execution.-E
: Suppress backslash interpretation.
-L
: Do not ignore symbolic links.-P
: Avoid symbolic links.
-1
: Print directories on new lines.-Q
: Print directories in quotation marks.
-n
: Display line numbers.-e
: Display$
at the end of each line.
-i
: Ask for confirmation before removal.-v
: Display the status of removal.
-v
: Display the status of directory creation.
-
Clone the repository:
git clone https://github.com/notkartikye/unix-shell.git cd unix-shell
-
Build the project:
make build
-
Clean the build files:
make clean
-
Run the shell:
./shell
./shell
> echo Hello, World!
Hello, World!
> ls -l
directory1
file1.txt
file2.txt
> date
Mon Apr 20 00:04:20 UTC 2022
> cat -n example.txt
1 This is an example file.
2 It has multiple lines.