UNIX shell manipulation
Budget: ₹1,500 – ₹12,500 INR
The new shell behaves in the same manner as the one developed previously, with the following
modifications:
• All the local commands are now prefixed with the character ! followed by a blank. In other
words, a command of the form
! command with arguments
shall now be processes just as the command
command with arguments
was processed by the previous incarnation of your shell. In particular, the command
! exit
terminates the shell, and commands such as
! & /usr/local/bin/test464
are possible.
• Commands not prefixed by ! denote commands that are to be sent for execution to a server
running on a remote machine. The name of the remote machine as well as the port number
are given in the configuration file by two lines of the form:
RHOST r
RPORT p
where r is an arbitrary string (the machine name) and p is a string representing a positive
number (the port number).
Once such a “remote” command has been sent, the shell awaits for, and prints everything
that the server cares to send back as a response. No terminating marker can be assumed for
the response received from the server.
The server response is printed in its entirety before the shell prompt is presented back to
the user, except when a remote command is prefixed by the character & followed by a blank
(the first two characters are not sent to the server). In such a case, the prompt is presented
immediately to the user, and all the pieces of the server response are printed to the terminal
as soon as they become available (the shell does not wait for the whole response, it prints
instead the received piece of the response as soon as this piece becomes available). An appropriate message must be printed by the shell as soon as the server response has been received
in its entirety.
Many standard application protocols use for compatibility reasons \r\n as line terminator,
so your shell should accept responses with either \r\n of the normal Unix \n as line terminators.
There are two new local commands (that must be issued prefixed by a ! to take effect):
keepalive
Before such a command is issued, the shell opens a connection to the server each time
the user types in a remote command, and closes the connexion as soon as the server
response has been received. Once the command keepalive has been issued, the shell
opens the connexion to the server when a remote command is typed in, and then keeps
the connection open until a close command (see below) is issued, upon connection
termination by the server (also see below), or upon termination. In other words, all the
subsequent remote commands will use the same connection to the server.
close
Closes the connection to the server in case such a connection is open, and reverts the
behaviour to the initial one (the connection to the server is closed after the completion
of each remote command).
modifications:
• All the local commands are now prefixed with the character ! followed by a blank. In other
words, a command of the form
! command with arguments
shall now be processes just as the command
command with arguments
was processed by the previous incarnation of your shell. In particular, the command
! exit
terminates the shell, and commands such as
! & /usr/local/bin/test464
are possible.
• Commands not prefixed by ! denote commands that are to be sent for execution to a server
running on a remote machine. The name of the remote machine as well as the port number
are given in the configuration file by two lines of the form:
RHOST r
RPORT p
where r is an arbitrary string (the machine name) and p is a string representing a positive
number (the port number).
Once such a “remote” command has been sent, the shell awaits for, and prints everything
that the server cares to send back as a response. No terminating marker can be assumed for
the response received from the server.
The server response is printed in its entirety before the shell prompt is presented back to
the user, except when a remote command is prefixed by the character & followed by a blank
(the first two characters are not sent to the server). In such a case, the prompt is presented
immediately to the user, and all the pieces of the server response are printed to the terminal
as soon as they become available (the shell does not wait for the whole response, it prints
instead the received piece of the response as soon as this piece becomes available). An appropriate message must be printed by the shell as soon as the server response has been received
in its entirety.
Many standard application protocols use for compatibility reasons \r\n as line terminator,
so your shell should accept responses with either \r\n of the normal Unix \n as line terminators.
There are two new local commands (that must be issued prefixed by a ! to take effect):
keepalive
Before such a command is issued, the shell opens a connection to the server each time
the user types in a remote command, and closes the connexion as soon as the server
response has been received. Once the command keepalive has been issued, the shell
opens the connexion to the server when a remote command is typed in, and then keeps
the connection open until a close command (see below) is issued, upon connection
termination by the server (also see below), or upon termination. In other words, all the
subsequent remote commands will use the same connection to the server.
close
Closes the connection to the server in case such a connection is open, and reverts the
behaviour to the initial one (the connection to the server is closed after the completion
of each remote command).