Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- My-Computer:~ user$ echo hello
- hello
- My-Computer:~ user$
- stringen () { cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-Z-A-z-0-9' | head -c "$1" ; }
- My-Computer:~ user$ stringen 18
- ^k6JPWVIUdEiudcWSMy-Computer:~ user$
- variable=$(stringen 18)
- echo $variable
- testfunc() { echo hello; } # a newline is printed
- output=$(testfunc) # $output does NOT contain a trailing newline
- echo "$output" # echo adds a newline
- printf "%s" "$output" # no newline
- $ stringen() { cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-Z-A-z-0-9' | head -c "$1" ; }
- $ stringen 18
- tr: range-endpoints of 'a-Z' are in reverse collating sequence order
- $ stringen () { cat /dev/urandom | env LC_CTYPE=C tr -cd 'A-Za-z0-9' | head -c "$1" ; }
- $ stringen 18
- V068BrYGKIICyLI4QB
- $
Add Comment
Please, Sign In to add comment