In: Computer Science
using Linux please fill in the blanks :
telnos files:
telnos |
telnos2 |
Hale Elizabeth Bot 744-6892 |
Hale Elizabeth Bot 744-6892 |
telnos3 |
telnos 4 |
Hale Elizabeth Bot 744-6892 |
Hale Elizabeth Bot 744-6892 |
The file books contains the following information:
Subject |
Book Title |
Author's Last Name |
Author's First Name |
Pub. Date |
Price |
UNIX: |
Introduction to UNIX: |
Wrightson: |
Kate: |
2003: |
45.00: |
UNIX: |
Just Enough UNIX: |
Anderson: |
Paul: |
2003: |
39.00: |
UNIX: |
Bulletproof UNIX: |
Gottleber: |
Timothy |
2002: |
48.00: |
UNIX: |
Learning the Korn Shell: |
Rosenblatt: |
Bill: |
1994: |
35.95: |
UNIX: |
A Student's Guide to UNIX: |
Hahn: |
Harley: |
1993: |
24.50: |
UNIX: |
Unix Shells by Example: |
Quigley: |
Ellie: |
1997: |
49.95: |
UNIX: |
UNIX and Shell Programming: |
Forouzan: |
Behrouz: |
2002: |
80.00: |
UNIX: |
UNIX for Programmers and Users: |
Glass: |
Graham: |
1993: |
50.00: |
SAS: |
SAS Software Solutions: |
Miron: |
Thomas: |
1993: |
25.95: |
SAS: |
The Little SAS Book, A Primer: |
Delwiche: |
Lora: |
1998: |
35.00: |
SAS: |
Painless Windows for SAS Users: |
Gilmore: |
Jodie: |
1999: |
40.00: |
SAS: |
Getting Started with SAS Learning: |
Smith: |
Ashley: |
2003: |
99.00: |
SAS: |
The How to for SAS/GRAPH Software: |
Miron: |
Thomas: |
1995: |
45.00: |
SAS: |
The Output Delivery System: |
Haworth: |
Lauren: |
2001: |
48.00: |
SAS: |
Proc Tabulate by Example: |
Haworth: |
Lauren: |
1999: |
42.00: |
SAS: |
SAS Application Programming: |
Dilorio: |
Frank: |
1991: |
35.00: |
SAS: |
Applied Statistics & SAS Programming: |
Cody: |
Ronald: |
1991: |
29.50: |
issue the command:
sort -n -t: +4 books
What is the result? ________________________________________________________________________________________________________________________________________________
Try another sort using the books file. Sort on the price field in reverse. Type in the following:
sort -nr -t: +5 books
What was the result? _______________________________________________________________________________________________________________________________________________
Type in:
sort -t: +0 +1 books > newbooks
What does the sorted file look like now?
__________________________________________________________________________________________________________________________________________________________________
. Issue the command:
grep -n H telnos
What was printed? ________________________________________________________________________________________________________________________________________________________________________________________________________________________
Issue the command:
grep -ni m telnos
What was printed this time?___________________________________________________________________________________________________________________________________________________________________________________________________________________
Answer 1
*************
Answer 2
***************
-n, --numeric-sort
-r, --reverse order
Answer 3
*************
-t, --field-separator=SEP
ascending order by 0th column then sort 1st column and create a new file for that sorted data and store result
Answer 4
*************
-n H
where ever found the H character gives the line number
Answer 5
*************
-n, --line-number
-i, --ignore case with character m
Thanks