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 10:00
According to alisa miller foreign news bureaus
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
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, 20.09.2020 06:01
question
Mathematics, 20.09.2020 06:01