Browse Source

shuffle ids for bulk.sh

this requires gshuf (coreutils) to be installed on OS X
jomo 10 years ago
parent
commit
9c5e5ff9a7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      test/bulk.sh

+ 3 - 1
test/bulk.sh

@@ -18,7 +18,9 @@ fi
 
 
 # insert newline after uuids
 # insert newline after uuids
 id_file="$(echo | cat 'uuids.txt' - 'usernames.txt')"
 id_file="$(echo | cat 'uuids.txt' - 'usernames.txt')"
-mapfile ids <<< $id_file
+# `brew install coreutils` on OS X
+id_file="$(shuf <<< "$id_file" || gshuf <<< "$id_file")"
+mapfile ids <<< "$id_file"
 
 
 bulk() {
 bulk() {
   trap return INT
   trap return INT