0. The file "cards" contains the following columns in the order stated:

1. Sort the file ~smcgowan/Cyber/Unix/Data/cards according to the 2nd column in reverse order.
A) What sort command did you use?
B) What was the last line of output from the sort command?

2. Sort the file ~smcgowan/Cyber/Unix/Data/cards according to the 2nd column and resolve ties using the 3rd column.
A) What sort command did you use?
B) What was line 31 of the output from the sort command?
C) How would you put just line 31 on standard out?

3. You want to make a list of all the lines from the file ~smcgowan/Cyber/Unix/Data/cards that do NOT represent Mickey Mantle cards.
A) What is the grep command you would use to accomplish this?
B) How many different cards (lines) are in this list?

4. You want to list all the cards that are yankees. So you want to print all the lines that end in 'Yankees' or 'yankees'.(Note here that "print" does not mean to send to a printer. "Print" is a term used with awk by us UNIX types to mean "write to stdout")
A) What grep will get this done?
B) How many different cards (lines) are in this list?

5. Math-heads often use the ^ to represent exponentiation. You need to find all the lines that have a^2 ("squared") in the file ~smcgowan/Cyber/Unix/Data/equations.
A) What grep command would you use?
B) If you save the output from this grep to a file, what is the size (in bytes) of the file?

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

1. A)
$sort -r +2 -3 ~smcgowan/Cyber/Unix/Data/cards...

By purchasing this solution you'll be able to access the following files:

50% discount

$12.60 $6.30
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Linux Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats