1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 09:53:22 -07:00

basic predictable text scrambler

This commit is contained in:
Connor Olding 2013-10-21 01:05:07 -07:00
parent 7af4bfbc92
commit 1f519900ab

8
sh/scramble Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
scramble() {
local eggs='s/@\(\w\)\(\w\)\(\w\)/@\3\1@\2/g'
sed \
-e 's/\b\w/&@/g' \
-e "$eggs" -e "$eggs" -e "$eggs" -e "$eggs" \
-e 's/@//g'
}