mirror of
https://github.com/notwa/rc
synced 2024-12-21 21:49:40 -08:00
19 lines
468 B
Bash
Executable file
19 lines
468 B
Bash
Executable file
#!/usr/bin/env sh
|
|
# compat: +ash +bash +dash +hush +ksh +mksh +oksh +osh +posh +yash +zsh
|
|
|
|
# works with busybox tr.
|
|
|
|
rot13() { ### @-
|
|
### rot13 with numbers rotated as well.
|
|
###
|
|
### ```
|
|
### $ rot13 <<< abc123
|
|
### nop678
|
|
### ```
|
|
###
|
|
### **NOTE:** there also exists rot13(1) programs provided by
|
|
### the *bsdgames* and *hxtools* packages that i don't use.
|
|
tr -- A-Za-z0-9 N-ZA-Mn-za-m5-90-4
|
|
}
|
|
|
|
[ -n "${preload+-}" ] || rot13 "$@"
|