subject

A Simple Shell for File Redirection. Design and implement a simple shell program to read a command with a file redirection. Here we use the following file-redirection symbols as follow: "in=infile" for input file named "infile", "out=outfile" for output file named "outfile", "app=appfile" for output to be appended a file named "appfile". For example, "ls out=out. txt" will output the result of the command to a file named out. txt.
Name your program: a2prog2.c
Note. You should use the sample program (provided below) as your base code to implement this part.
Warning: Do not use any "system(…)" function call throughout this assignment.
For example (and for your test cases). Your current working directory is a3part1.
1. whoami
2. date
3. pwd
4. echo "Assignment3 Part1 #2 start"
5. ls
6. ls out=p1out1.txt
7. wc in=p1out1.txt
8. cat in=p1out1.txt
9. date out=p1out2.txt
10. date app=p1out2.txt
11. cat in=p1out2.txt
12. wc in=p1out1.txt out=p1out4.txt
13. cat in=p1out4.txt
14. echo "Assignment3 Part1 #2 done"
15. date
#3. Provide a Makefile file to compile your program.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
How can you know if the person or organization providing the information has the credentials and knowledge to speak on this topic? one clue is the type of web site it is--the domain name ".org" tells you that this site is run by a nonprofit organization.
Answers: 2
question
Computers and Technology, 22.06.2019 07:30
An endless cycle of creation and response on the internet is called
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Which tab should you open to find the option for adding a header?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
You know the right answer?
A Simple Shell for File Redirection. Design and implement a simple shell program to read a command...
Questions
question
Mathematics, 09.04.2020 20:55
question
Mathematics, 09.04.2020 20:55
Questions on the website: 13722361