[Solved] Lab 10. Write your own UNIX Shell, part 2

30 $

File Name: Lab_10._Write_your_own_UNIX_Shell,_part_2.zip
File Size: 386.22 KB

SKU: [Solved] Lab 10. Write your own UNIX Shell, part 2 Category: Tag:

Or Upload Your Assignment Here:


Student will work with process management and some basic system calls.Important note: please use sp1, sp2, sp3, or atoz servers for this lab.UNIX ShellIn Lab9 we did the 3 built-in commands: cd, pwd, exit.lNow we need to add an exec and code to handle redirection.FILES TO COPY:To get the file you need, first move to your class folder by typing: cd csc60The following command will create a directory named lab10 and put all the needed files into it belowyour csc60 directory.Type: cp -R /gaia/home/faculty/bielr/classfiles_csc60/lab10 .Spaces needed: (1) After the cp ↑ Don’t miss the space & dot.(2) After the -R(3) After the directory name at the end & before the dot.After the files are in your account and you are still in csc60, you need to type: chmod 755 lab10This will give permissions to the directory.Still in csc60, type: cp lab9/lab9.c lab10/lab10.cWe have copied lab9 code and renamed it to lab10.c for you to start work on it.Next move into lab10 directory and type: chmod 644 *This will set permissions on the files.Your new lab10 directory should now contain: lab10.c, waitpid.c, redir.cA lot of code to be used in Lab10 is currently commented out.Use the file Lab9-10 GuideToRemoveComments (on SacCT) to guide you to remove a set of the extracomments.Pseudo Code (Yellow highlight indicates the code from Lab9.)/*———————————————————-*/int main (void){while (TRUE){int childPid;char *cmdLine;print the prompt(); /* i.e. csc60mshell , Use printf*/fgets(cmdline, MAXLINE, stdin);Call the function parseline, sending in cmdline & argv, getting back argc/* code to print out the argc and the agrv list to make sure it all came in. *//* This code is not required for lab10. You may leave it in or get rid of it near the end. */Print a line. Ex: “Argc = %i”loop starting at zero, thru less than agrc, increment by one.print each argv[loop counter] more on next page

Reviews

There are no reviews yet.

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

Shopping Cart
[Solved] Lab 10. Write your own UNIX Shell, part 2
30 $