Kaynağa Gözat

randomize() doesn't need positional args; we're piping into it

Jan Schaumann 5 yıl önce
ebeveyn
işleme
874b8cf264
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      tmpmail

+ 2 - 2
tmpmail

@@ -211,7 +211,7 @@ list_emails() {
 
 # shuf(1) is not part of POSIX, neither is 'sort -R'
 randomize() {
-	awk 'BEGIN {srand();} {print rand(), $0}' "$@" | \
+	awk 'BEGIN {srand();} {print rand(), $0}' | \
 		sort -n -k1 | cut -d' ' -f2
 }
 
@@ -282,7 +282,7 @@ print_error() {
 
 main() {
     # Iterate of the array of dependencies and check if the user has them installed
-    for dependency in jq w3m curl; do
+    for dependency in jq curl; do
         if ! command -v "$dependency" >/dev/null 2>&1; then
             print_error "Could not find '$dependency', is it installed?"
         fi