aDdEd mY sponGe SCRiPT lOL
This commit is contained in:
parent
8460da569c
commit
d047373d87
18
bash/sponge
Executable file
18
bash/sponge
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo -e "\nspongifying $@...\n\n"
|
||||||
|
|
||||||
|
str="$@"
|
||||||
|
lstr="${str,,}"
|
||||||
|
ustr="${str^^}"
|
||||||
|
|
||||||
|
# https://stackoverflow.com/a/10552175
|
||||||
|
for (( c=0; c<${#str}; c++ )); do
|
||||||
|
# https://stackoverflow.com/a/1195035
|
||||||
|
if [[ $((1 + $RANDOM % 10)) < 5 ]]; then
|
||||||
|
echo -n "${lstr:$c:1}"
|
||||||
|
else
|
||||||
|
echo -n "${ustr:$c:1}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo; echo
|
Loading…
x
Reference in New Issue
Block a user