This is an implementation of unix shell with special piping machanism.
- noop - this command does nothing.
- number - this command adds a number to each line of input.
- removetag - this command remove html tag from the input without modifying the input.
- removetag0 - this command is same as removetag, but it outputs message to stderr.
- exit - this command terminate the shell program.
- ls - this command lists all files in working directory.
- cat - this command shows the input on the screen.
- Regular Pipe - "|" is the regular pipe, it means that the standard ouput of last command will be piped to the next command.
- Special Pipe - "|N" (0 < N < 1000, where N is a natural number) is the special pipe, the standard output of the last command will be piped to the next Nth line.
This shell program also implement ">" operator to redirect standard output of last command to a file.
There must be a space between every command, argument, and operator. Special pipe is an exception, there should not be any spaces between "|" and "N".
command argument | command
command argument |N
git clone https://github.com/bchu7796/SimpleShell.git
cd SimpleShell
make
NCTU CS - Network Programming 2018.