Unix
From: escobo (bothata_at_hotmail.com)
Date: 04/20/04
- Previous message: Tim Haynes: "Re: How to become a System Administrator?"
- Next in thread: Chris F.A. Johnson: "Re: Unix"
- Reply: Chris F.A. Johnson: "Re: Unix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Apr 2004 17:46:53 -0700
Listing The file data.txt has the following structure:
Item1 Item2 ... ItemN
------------------------------------------------
Value11 Value21 ... ValueN1
Value12 Value22 ... ValueN2
: : :
Value1M Value2M ... ValueNM
Create a script that displays the information from the file data.txt
sorted by some criteria. Your script should have the following input
parameters:
listing -h -ilist -olist -ffile
-h displays help
-ilist, list defines criteria for sorting,
-olist, list defines which values will be displayed on the output,
-ffile, name of the input file.
Example
listing -i3,4 -o2,1 -fstudents.txt
file students.txt has the following contents
Surname Name Class Group
---------------------------------------
Novak Petr 3 24
Dvorak Jiri 3 24
Kovarikova Lenka 3 23
Michalek Karel 4 12
Cesilko Mirek 3 23
The script listing displays
Class 3
Group 23
Lenka Kovarikova
Mirek Cesilko
Group 24
Petr Novak
Jiri Dvorak
Class 4
Group 12
Karel Michalek
- Previous message: Tim Haynes: "Re: How to become a System Administrator?"
- Next in thread: Chris F.A. Johnson: "Re: Unix"
- Reply: Chris F.A. Johnson: "Re: Unix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|