zsh

1
2
3
4
5
6
7
8
9
function decrypt_caesar()
{
  CIPHER=${@}
  for i in {B-Z} A
  do
    echo ${CIPHER} | tr -s "A-Z" "${i}-ZA${h}"
    h="-${i}"
  done
}