New! Hire Essay Assignment Writer Online and Get Flat 20% Discount!!Order Now

KIT501 ICT Systems Administration Fundamentals

  • Subject Code :  

    KIT501

  • Country :  

    AU

  • University :  

    University of Tasmania

Task A

Write a shell script (to run on the Bourne shell) that can be used to remove some old C programs you no longer wish to keep. When the script is run with no arguments supplied, it picks up each C program from the current directory and lists the first 10 lines (hint: research the head command). It then prompts for deletion of the file (the user can then choose to delete or not to delete the file). When the user supplies arguments (C program file names) with the script, it works on those files only.

Your script for this task must be named delC.sh. In designing your script you should consider the following scenarios:

• There is no C program file stored under the current directory;
• There is at least one C program file stored under the current directory;
• The user-supplied arguments list contains names of existing C programs stored under the current directory. We can assume that all the C programs have been correctly named as .c, and that there are no special characters (such as space) in any of these filenames;
• The user-supplied arguments list contains both existing and missing names of C programs stored under the current directory. Missing names refer to the files which no longer exist under the current directory.

Script requirements

You must:

• Include your name, student ID, and a brief introduction of what the script does in all your shell scripts, as a comment in the beginning of each script.
• Make your scripts run on the Bourne shell, regardless of which shell the user of your scripts is currently on.
• Add in-line comments to help other people understand your scripts.
• Use "\n" where appropriate to make the output of your scripts more readable.
• Note that your script structure and layout are also important as they will be marked as part of the assessment process.

Get An Awesome Price Quote For Your Paper – Absolutely FREE!
    Add File
    Files Missing!

    Please upload all relevant files for quick & complete assistance.

    Getting started with MyEssayAssignmentHelp is FREE

    15,000+ happy customers and counting!

    Rated 4.7/5 based on
    1491 reviews
    ;