Skip to content

Commit d652ac1

Browse files
committed
Complete sort-uniq-head-tail script-04.sh exercise
1 parent 287b4b0 commit d652ac1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

shell-pipelines/sort-uniq-head-tail/script-04.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ set -euo pipefail
55
# The input for this script is the scores-table.txt file.
66
# TODO: Write a command to output scores-table.txt, with shows the line for the player whose first score was the second highest.
77
# Your output should be: "Piotr Glasgow 15 2 25 11 8" (without quotes).
8+
9+
sort -k3 -nr scores-table.txt | head -n 2 | tail -n 1

0 commit comments

Comments
 (0)