Skip to content

Commit adba6e5

Browse files
author
Craig D'Silva
committed
Complete script 6 & 7 of sort-uniq-head-tail
1 parent 8f21fbc commit adba6e5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

shell-pipelines/sort-uniq-head-tail/script-06.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 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+
9+
cat events.txt | sort | uniq -c

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ 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+
10+
cat events-with-timestamps.txt | awk '{print $3, $4;}' | grep -v 'Event' | sort | uniq -c

0 commit comments

Comments
 (0)