system-bus-radio/tests/check-lines.sh
Tomáš Hübelbauer 8b0d96fff9 Script for checking no of tabs in TEST-DATA.csv so it never breaks GitHub preview (#39)
* Check for equal number of tabs on each line of TEST-DATA.tsv

* Fix script name

* Move to tests
2018-01-17 13:17:03 -05:00

12 lines
300 B
Bash

#!/usr/bin/env bash
UNIQUE_TAB_LINES_COUNT=$(sed 's/[^\t]//g' TEST-DATA.tsv | sort -u | wc -l)
if [ $UNIQUE_TAB_LINES_COUNT -eq "1" ]
then
echo "All lines have the same number of tabs. All good!"
else
echo "Not all lines have the same number of tabs."
echo $UNIQUE_TAB_LINES_COUNT
exit 1
fi