Skip to content

Commit 19d2067

Browse files
committed
sort-uniq-head-tail updated
1 parent ca1ce20 commit 19d2067

3 files changed

Lines changed: 1 addition & 5 deletions

File tree

‎shell-pipelines/sort-uniq-head-tail/script-02.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ 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 lines sorted by the person's first score, descending.
77
# The first line of your output should be "Basia London 22 9 6" (with no quotes).
8-
sort -k3nr scores-table.txt
8+
sort -k3 -nr scores-table.txt

‎shell-pipelines/sort-uniq-head-tail/script-06.sh‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ set -euo pipefail
55
# The input for this script is the events.txt file.
66
# TODO: Write a command to show how many times anyone has entered and exited.
77
# It should be clear from your script's output that there have been 5 Entry events and 4 Exit events.
8-
sort events.txt | uniq -c
9-
echo "--------------------------------"
108
awk '{print $1}' events.txt | sort | uniq -c

‎shell-pipelines/sort-uniq-head-tail/script-07.sh‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ set -euo pipefail
66
# TODO: Write a command to show how many times anyone has entered and exited.
77
# It should be clear from your script's output that there have been 5 Entry events and 4 Exit events.
88
# The word "Event" should not appear in your script's output.
9-
tail +2 events-with-timestamps.txt | awk '{print $3, $4}' | sort | uniq -c
10-
echo "--------------------------------"
119
tail +2 events-with-timestamps.txt | awk '{print $3}' | sort | uniq -c

0 commit comments

Comments
 (0)