Merge pull request #205 from YunoHost/fix-bracket-in-passwd-from-ynh-string-random

[fix] Bracket in passwd from ynh_string_random
This commit is contained in:
Laurent Peuch 2016-12-11 14:26:27 +01:00 committed by GitHub
commit 050842b855

View file

@ -6,6 +6,6 @@
# | arg: length - the string length to generate (default: 24)
ynh_string_random() {
dd if=/dev/urandom bs=1 count=200 2> /dev/null \
| tr -c -d '[A-Za-z0-9]' \
| tr -c -d 'A-Za-z0-9' \
| sed -n 's/\(.\{'"${1:-24}"'\}\).*/\1/p'
}