7 lines
217 B
Bash
Executable File
7 lines
217 B
Bash
Executable File
#!/bin/bash
|
|
while IFS='' read -r -d '' -n 1 char
|
|
do
|
|
printf %s "$char" | ( [ $(( $RANDOM % 2 )) -eq 0 ] && tr '[[:lower:]]' '[[:upper:]]' || tr '[[:upper:]]' '[[:lower:]]' )
|
|
done <<< "${@:-$(cat /dev/stdin)}"
|
|
|