浏览代码

shuffle ids for bulk.sh

this requires gshuf (coreutils) to be installed on OS X
jomo 10 年之前
父节点
当前提交
9c5e5ff9a7
共有 1 个文件被更改,包括 3 次插入1 次删除
  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