Find Jobs
Hire Freelancers

Perl program

$10-30 AUD

Status
Publicerad över sex år sedan

$10-30 AUD

Betalning vid leverans
Title: pkginfo with Perl 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: It must be named [login to view URL] It must be invoked as: [login to view URL] 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. File installed_software_file can have any arbitrary name. It must be a file of text with the following format: The file consists of an arbitrary number of lines (including, possibly, zero lines). Each line must contain four fields separated by commas. The four fields are: category, name, description, size in kilobytes. 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. 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. 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. 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: [login to view URL] -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 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: [login to view URL] –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 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: [login to view URL] –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 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. No options can be used simultaneously. This means that your program can only be invoked with one of the options at a time. 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: [login to view URL] -Z installed_software_file Output: Invalid command syntax Zip your file [login to view URL] 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.
Project ID: 15395485

Om projektet

2 anbud
Distansprojekt
Senaste aktivitet sex år sedan

Ute efter att tjäna lite pengar?

Fördelar med att lägga anbud hos Freelancer

Ange budget och tidsram
Få betalt för ditt arbete
Beskriv ditt förslag
Det är gratis att registrera sig och att lägga anbud på uppdrag
2 frilansar lägger i genomsnitt anbud på $28 AUD för detta uppdrag
Använd avatar
This project is where my interest and work coincide.
$30 AUD Om 5 dagar
0,0 (0 omdömen)
0,0
0,0
Använd avatar
Hello Sir/mam, AS per your requirement I have all skills required for you project. I am able to give you project on time in appropriate rate. Looking for you. Thanks!!! Stay tuned, I'm still working on this proposal.
$25 AUD Om 1 dag
0,0 (0 omdömen)
2,2
2,2

Om kunden

Flagga för AUSTRALIA
SYDNEY, Australia
0,0
0
Verifierad betalningsmetod
Medlem sedan okt. 13, 2017

Kundverifikation

Tack! Vi har skickat en länk för aktivering av gratis kredit.
Något gick fel med ditt e-postmeddelande. Vänligen försök igen.
Registrerade Användare Totalt antal jobb publicerade
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Laddar förhandsgranskning
Tillstånd beviljat för geolokalisering.
Din inloggningssession har löpt ut och du har blivit utloggad. Logga in igen.