cis3207_lab2's Introduction
Name: myshell Synopsis: myshell [batch.txt] Run: 1. make 2. ./myshell [batch.txt] Description: Batch Mode: Shell reads file which contains multiple lines of commands, and should be able to execute each command Internal commands: a. cd <directory> - Change the current default directory to <directory>. If the <directory> argument is not present, report the current directory. If the directory does not exist an appropriate error should be reported. This command should also change the PWD environment variable. b. clr - Clear the screen. c. dir <directory> - List the contents of directory <directory>. d. environ - List all the environment strings. e. echo <comment> - Display <comment> on the display followed by a new line (multiple spaces/tabs may be reduced to a single space). f. help - Display the user manual using the more filter. g. pause - Pause operation of the shell until 'Enter' is pressed. h. quit - Quit the shell. i. The shell environment should contain shell=<pathname>/myshell where <pathname>/myshell is the full path for the shell executable(not a hardwired path back to your directory, but the one from which it was executed). I/O Redirections: myshell supports on either or both stdin and/or stdout. The command line programname arg1 arg2 < inputfile > outfile will execute the program programname with arguments arg1 and arg2, the stdin FILE stream replaced by inputfile and the stdout FILE stream replaced by outputfile. stdout redirection should also be possible for the internal commands dir, environ, echo, & help. With output redirection, if the redirection character is > then the outputfile is created if it does not exist and truncated if it does. If the redirection token is >> then outputfile is created if it does not exist and appended to if it does. Background programs: An ampersand (&) at the end of the command line indicates that the shell should return to the command line prompt immediately after launching that program. Pipes: Several commands are strung together command1 arg1 | command2 arg2 Path Environment: Path environment contains path to find myshell
cis3207_lab2's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.