Compare commits
No commits in common. "8707420344d7e1317e5432605275a1746a5e45af" and "200749bf8b5d9de106bd5cc2353a798c1b07287a" have entirely different histories.
8707420344
...
200749bf8b
18
bash/sponge
18
bash/sponge
@ -1,18 +0,0 @@
|
|||||||
#!/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