シーザー暗号

2014/10/26

zsh

function decrypt_caesar()
{
  CIPHER=${@}
  for i in {B-Z} A
  do
    echo ${CIPHER} | tr -s "A-Z" "${i}-ZA${h}"
    h="-${i}"
  done
}