소스 검색

use LC_ALL=C instead

Siddharth Dushantha 5 년 전
부모
커밋
c4e0fa1471
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tmpmail

+ 1 - 1
tmpmail

@@ -81,7 +81,7 @@ generate_email_address() {
     # So charcters such as dashes, periods, underscore, and numbers are all deleted,
     # giving us a text which only contains lower case letters form A to Z. We then take
     # the first 10 characters, which will be the username of the email address
-    USERNAME=$(date +%s | base64 | tr -dc "[:alnum:]" | tr "[:upper:]" "[:lower:]")
+    USERNAME=$(head /dev/urandom | LC_ALL=C tr -dc "[:alnum:]" | cut -c1-11 | tr "[:upper:]" "[:lower:]")
 
     # Valid TLDS which 1secmail provides.
     TLDS="com net org"