Sfoglia il codice sorgente

shuffle ids for bulk.sh

this requires gshuf (coreutils) to be installed on OS X
jomo 10 anni fa
parent
commit
9c5e5ff9a7
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      test/bulk.sh

+ 3 - 1
test/bulk.sh

@@ -18,7 +18,9 @@ fi
 
 # insert newline after uuids
 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() {
   trap return INT