Skip to content

Instantly share code, notes, and snippets.

@benwaffle
Created February 12, 2018 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benwaffle/7ad507912b32a278b43b7c6c78b5bf37 to your computer and use it in GitHub Desktop.
Save benwaffle/7ad507912b32a278b43b7c6c78b5bf37 to your computer and use it in GitHub Desktop.
#!/bin/bash
tests=$(cat testcases.txt)
tests=${tests//$'\n'$'\n'/$'\t'}
IFS=$'\t'
result=( $tests )
cnt=0
for x in ${result[@]}; do
((cnt++))
echo $x | ./contacts > test$cnt.out
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment