[SOLVED] 代写 shell CSE 2431 Lab 5: UNIX Shell (Part III) Instructor: Adam C. Champion, Ph.D.

30 $

File Name: 代写_shell_CSE_2431_Lab_5:_UNIX_Shell_(Part_III)_Instructor:_Adam_C._Champion,_Ph.D..zip
File Size: 810.12 KB

SKU: 6916097394 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


CSE 2431 Lab 5: UNIX Shell (Part III) Instructor: Adam C. Champion, Ph.D.
Group Size: 1, which means you are required to finish this lab assignment by yourself.
Goal: Getting familiar with UNIX file system operations.
Instruction: The history feature introduced in Lab 3 is not persistent (i.e., the shell program does not maintain the command history across different runs). To make it persistent, you need to modify your shell program to save the contents of the history buffer into a file before it exits. In addition, the shell program needs to reload the previous commands from the saved history file once you start the program. You can name the command history file as .history. For the first time execution of your shell program, the history buffer should be empty and you can create such history file when exiting the program.
Specifically, you need to modify the main() function and possibly other related functions as well in the file shell.c. In the initialization phase, you need to check the existence of the command history file. If it exists, you should open the file and load the command history into the history buffer. Otherwise, you just initialize the history buffer as empty buffer. At the end of the main() function and other possible exit points of the program, you should save the current command history into the history file for future uses.
Note: Name the history file as .history to differentiate your file from others¡¯ files. You can decide the format of the history file as long as it can be reloaded for future program execution.
Submission: Put all your modification in the file shell.c. Submit that file in a .tar.gz or .zip file on Carmen using the commands described for Lab 0. At the beginning of the file shell.c, you need to tell the grader your full name, how to compile your file, and how to run your compiled program. Make sure your instructions work correctly.
Page 1 of 1

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 shell CSE 2431 Lab 5: UNIX Shell (Part III) Instructor: Adam C. Champion, Ph.D.
30 $