#!/bin/bash FILE="./array-sorter" echo {1..300} > ./numbers.txt cat ./numbers.txt | tr ' ' "\\n" | shuf | tr "\\n" ' ' > ./random.txt if test -f ./array-sorter; then echo "$FILE exists, running" else echo "$FILE doesn't exist, building" go build -o $FILE . fi ./array-sorter $(cat ./random.txt)