Skip to content

alidev20002/linux-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 

Repository files navigation

Linux Shell

Our Linux shell supports all Linux commands and a few extra commands.

Requirements

use the following command to install readline library before running the shell:

sudo apt-get install libreadline-dev

Run

gcc shell.c -lreadline
./a.out

List of additional commands

  • fs → prints the first string of each line of input file

  • mw → prints the most frequent word in file

  • rs → removes empty spaces from file

  • rmc → prints uncommented lines of file

  • lc → prints the number of file lines

  • ft → prints first ten lines of file

Usage

All additional commands are used this way:

[command] [file path]

For example if test file be as follows:

Good morning
hi ali
hello world

The result will be:

fs /Desktop/test.txt
Good
hi
hello

Features

  • Save commands in history

  • User can switch between commands that saved in history and choose one of them

  • Support pipeline commands

  • Fork new process for every command

  • Print errors using stderr

  • Customize control-c action

About

Linux Shell using C language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages