ish shell project using c
Budget: $120 – $180 USD
I am looking for an experienced C developer to implement ish shell using c, I already have some code written already, you can reorganize it or write you can use it, or write from scratch. More details I will share more in chat. Someone who can complete it in the next 2-3 days only applies bid.
Implement the Unix shell described in the accompanying man page. Be sure to include all the files needed to make the shell. Your shell should compile by typing make, producing an executable file named ish.
You may, if you desire, use lex and yacc to implement your command parsing. Even if you have
not used these programs before, you will probably find it much simpler to learn them than to write
your own parser. The lex and yacc input files ish. l and ish.y, respectively, are provided, along with
tutorials.
To implement ish you will obviously be creating a process that forks off other processes, which may
in turn fork processes, etc. Unix limits the number of processes you can have; if you run out you
won’t be able to do very much so be careful. While you are testing you may want to somehow limit
the number of shells you can have running at the same time.
NAME
ish − a shell (command interpreter) with a csh−like syntax and advanced interactive features.
SYNOPSIS
ish
DESCRIPTION
ish, a shell, is a command interpreter with syntax similar to csh.
INITIALIZATION AND TERMINATION
When first started, ish performs commands from the file ˜/.ishrc, provided that it is readable. Typically, the ˜/.ishrc file contains commands to specify the terminal type and environment.
INTERACTIVE OPERATION
After startup processing, an interactive ish shell begins reading commands from the terminal, prompting
with hostname%. The shell then repeatedly performs the following actions: a line of command input is
read and broken into words; this NAME
ish − a shell (command interpreter) with a csh−like syntax and advanced interactive features.
SYNOPSIS
ish
DESCRIPTION
ish, a shell, is a command interpreter with syntax similar to csh.
INITIALIZATION AND TERMINATION
When first started, ish performs commands from the file ˜/.ishrc, provided that it is readable. Typically, the
˜/.ishrc file contains commands to specify the terminal type and environment.
INTERACTIVE OPERATION
After startup processing, an interactive ish shell begins reading commands from the terminal, prompting
with hostname%. The shell then repeatedly performs the following actions: a line of command input is
read and broken into words; this sequence of words is parsed (as described under USAGE); and the shell
executes each command in the current line
USAGE
LEXICAL STRUCTURE
The shell splits input lines into words separated by spaces or tabs, with the following exceptions:
* The special characters ’&’, ’|’, ’<’, sequences of special characters form single words: ’>>’,
* Special characters preceded by a backslash ’\’ character prevents the shell from interpreting them
as special characters.
* Strings enclosed in double quotes (’’) or quotes (’) form part or all of a single word. Special characters inside of strings do not form separate words.
Other than the above we need to have the below functions as well for shell.
COMMAND LINE PARSING
I/O REDIRECTION
COMMAND EXECUTION
ENVIRONMENT VARIABLES
SIGNAL HANDLING
JOB CONTROL
STATUS REPORTING
BUILT−IN COMMANDS
FILES
>, >& Redirect the standard output to a file. If the file does not exist, it is created. If it does exist, it is
overwritten; its previous contents are lost. The ’&’ form redirects both standard output and the
standard error to the file.
>>, >>&
Append the standard output. Like ’>’, but places output at the end of the file rather than overwriting it. The ’&’ form appends both the standard error and standard output to the file.
Implement the Unix shell described in the accompanying man page. Be sure to include all the files needed to make the shell. Your shell should compile by typing make, producing an executable file named ish.
You may, if you desire, use lex and yacc to implement your command parsing. Even if you have
not used these programs before, you will probably find it much simpler to learn them than to write
your own parser. The lex and yacc input files ish. l and ish.y, respectively, are provided, along with
tutorials.
To implement ish you will obviously be creating a process that forks off other processes, which may
in turn fork processes, etc. Unix limits the number of processes you can have; if you run out you
won’t be able to do very much so be careful. While you are testing you may want to somehow limit
the number of shells you can have running at the same time.
NAME
ish − a shell (command interpreter) with a csh−like syntax and advanced interactive features.
SYNOPSIS
ish
DESCRIPTION
ish, a shell, is a command interpreter with syntax similar to csh.
INITIALIZATION AND TERMINATION
When first started, ish performs commands from the file ˜/.ishrc, provided that it is readable. Typically, the ˜/.ishrc file contains commands to specify the terminal type and environment.
INTERACTIVE OPERATION
After startup processing, an interactive ish shell begins reading commands from the terminal, prompting
with hostname%. The shell then repeatedly performs the following actions: a line of command input is
read and broken into words; this NAME
ish − a shell (command interpreter) with a csh−like syntax and advanced interactive features.
SYNOPSIS
ish
DESCRIPTION
ish, a shell, is a command interpreter with syntax similar to csh.
INITIALIZATION AND TERMINATION
When first started, ish performs commands from the file ˜/.ishrc, provided that it is readable. Typically, the
˜/.ishrc file contains commands to specify the terminal type and environment.
INTERACTIVE OPERATION
After startup processing, an interactive ish shell begins reading commands from the terminal, prompting
with hostname%. The shell then repeatedly performs the following actions: a line of command input is
read and broken into words; this sequence of words is parsed (as described under USAGE); and the shell
executes each command in the current line
USAGE
LEXICAL STRUCTURE
The shell splits input lines into words separated by spaces or tabs, with the following exceptions:
* The special characters ’&’, ’|’, ’<’, sequences of special characters form single words: ’>>’,
* Special characters preceded by a backslash ’\’ character prevents the shell from interpreting them
as special characters.
* Strings enclosed in double quotes (’’) or quotes (’) form part or all of a single word. Special characters inside of strings do not form separate words.
Other than the above we need to have the below functions as well for shell.
COMMAND LINE PARSING
I/O REDIRECTION
COMMAND EXECUTION
ENVIRONMENT VARIABLES
SIGNAL HANDLING
JOB CONTROL
STATUS REPORTING
BUILT−IN COMMANDS
FILES
>, >& Redirect the standard output to a file. If the file does not exist, it is created. If it does exist, it is
overwritten; its previous contents are lost. The ’&’ form redirects both standard output and the
standard error to the file.
>>, >>&
Append the standard output. Like ’>’, but places output at the end of the file rather than overwriting it. The ’&’ form appends both the standard error and standard output to the file.