Urgenthomework logo
UrgentHomeWork
Live chat

Loading..

Usp32547: Unix Systems Assessment Answer

IAH170

Programming Assignment Help:

Task:

Title: pkginfo with Perl

In this assignment, you will write a Perl program which simulates the behaviour of command pkginfo (a command available in some versions of Unix). Your Perl program will parse a file containing information about installed software packages and will generate output depending on the command line.
These are the specifications for your Perl program:
1. It must be named pkginfo.pl
2. It must be invoked as:
pkginfo.pl option installed_software_file

The program must check that the installed_software_file argument exists, is a file and is readable. If not, it must print an error message to the standard output and exit. The values for the option argument are described below.

3. File installed_software_file can have any arbitrary name. It must be a file of text with the following format:
a. The file consists of an arbitrary number of lines (including, possibly, zero lines).
b. Each line must contain four fields separated by commas.
c. The four fields are: category, name, description, size in kilobytes.
d. The category and name fields are each a string of characters of arbitrary (yet reasonably limited) length.Acceptable characters include: lower and upper case letters, digits, underscore, dot.
e. The description field is a string of characters of arbitrary (yet reasonably limited) length. Acceptable characters include: lower and upper case letters, digits, underscore, dot, ‘+’, ‘/’, ‘-‘, space.
f. The size in kilobytes field is an integer limited between 1 and 10000000. The following is an example of file installed_software_file: system,SUNWdoc,Documentation Tools,1251 application,SPROcpl,C++ Compiler,25477
system,BRCMbnxe,Broadcom NIC Driver,5423 newcat,madeup,a made up line,100000 application,ecj,Eclipse JDT,75443
Very important note: your program is not expected to verify that file installed_software_file complies with the above specifications. It will only be tested with compliant files.

4. Your program can be invoked with option: -a. In this case, it must print the following: Installed software:
<first name in appearance order>
<second name in appearance order>
<last name in appearance order>
Example with the example installed_software_file given above:

Command line:
pkginfo.pl -a installed_software_file

Installed software:
SUNWdoc
SPROcpl
BRCMbnxe
madeup
ecj

In the case in which file installed_software_file is empty, your program must instead only print: No software installed

5. Your program can be invoked with option: -s. In this case, it must only print the following string:
Total size in kilobytes: <total size in kilobites of all the installed packages>

Example with the example installed_software_file given above:
Command line:
pkginfo.pl –s installed_software_file

Output:
Total size in kilobytes: 207594
In the case in which file installed_software_file is empty, your program must print:
Total size in kilobytes: 0

6. Your program can be invoked with option: -l <name>. Argument <name> follows the same rules as the name field. In this case, it must print:
Package <name>:
Category: <category>
Description: <description>
Size in kilobytes: < size in kilobytes>
Example with the example installed_software_file given above:

Command line:
pkginfo.pl –l ecj installed_software_file

Output:
Package ecj:
Category: application
Description: Eclipse JDT
Size in kilobytes: 75443
In the case in which name <name> is not present in installed_software_file, your program
must print:
No installed package with this name

7. Your program can be invoked with option: -v. In this case, it must only print your name, surname and student ID in a format of your choice.
8. No options can be used simultaneously. This means that your program can only be invoked with one of the options at a time.
9. If your program is invoked with a valid file argument, but any other syntax than what specified above, it must only print the following string to the standard output: Invalid command syntax
Example:
Command line:
pkginfo.pl -Z installed_software_file
Output:
Invalid command syntax

10. Zip your file pkginfo.pl into a file named USP_<yourSurname>_<yourStudentID>.zip and submit it with the modalities specified above. Several free zip utilities are available on the WWW.


Buy Usp32547: Unix Systems Assessment Answer Online


Talk to our expert to get the help with Usp32547: Unix Systems Assessment Answers to complete your assessment on time and boost your grades now

The main aim/motive of the management assignment help services is to get connect with a greater number of students, and effectively help, and support them in getting completing their assignments the students also get find this a wonderful opportunity where they could effectively learn more about their topics, as the experts also have the best team members with them in which all the members effectively support each other to get complete their diploma assignments. They complete the assessments of the students in an appropriate manner and deliver them back to the students before the due date of the assignment so that the students could timely submit this, and can score higher marks. The experts of the assignment help services at urgenthomework.com are so much skilled, capable, talented, and experienced in their field of programming homework help writing assignments, so, for this, they can effectively write the best economics assignment help services.

Get Online Support for Usp32547: Unix Systems Assessment Answer Assignment Help Online

Resources

    • 24 x 7 Availability.
    • Trained and Certified Experts.
    • Deadline Guaranteed.
    • Plagiarism Free.
    • Privacy Guaranteed.
    • Free download.
    • Online help for all project.
    • Homework Help Services
); }
Copyright © 2009-2023 UrgentHomework.com, All right reserved.