Question: Using linux bash q10) [5] Suppose the variable name contains a player's name, and that the variable score contains that player's score. Given the input

Using linux bash

q10) [5] Suppose the variable "name" contains a player's name, and that the variable "score" contains that player's score. Given the input file "highscores.tsv" (in 1280data, a list of 10 high scores, tab delimited), give a command that will display the new high-score list with the following restrictions: Only 10 high scores may be displayed. The 10 high scores are displayed in numerically descending order (highest to lowest). A player may only appear in the high-score list once -- if the player has a new high score, only their highest score is retained in the list. Do not modify the input file. Assume no issues with the name or score variables. HINT1: use printf '%s\t%s ' to add the new high score. HINT2: use uniq -f to remove duplicate entries per player. HINT3: use rev to convert intermediate formats. Other tools may be necessary.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!