7 lines
217 B
Plaintext
7 lines
217 B
Plaintext
|
#!/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)}"
|
||
|
|