Skip to content

Commit

Permalink
Add helper bash functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
sukritkalra committed Mar 19, 2024
1 parent 0d42105 commit 1faa1ce
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions analyze_utils.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# cancelled() method takes a CSV as input and outputs the number of
# TaskGraphs that have been cancelled.
cancelled() {
if [[ "$1" == *.csv ]]; then
cat $1 | grep "TASK_CANCEL" | awk -F, "{print $6}" | sort | uniq | wc -l
else
echo "cancelled() takes a CSV file as input."
fi
}

0 comments on commit 1faa1ce

Please sign in to comment.