Skip to content

Instantly share code, notes, and snippets.

@0x48piraj
Created September 24, 2020 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x48piraj/b3397ce185d204483f8872342e907541 to your computer and use it in GitHub Desktop.
Save 0x48piraj/b3397ce185d204483f8872342e907541 to your computer and use it in GitHub Desktop.
Bash one-liner for breaking caesar cipher.
#!/bin/bash
tr 'A-Z' 'a-z' < $2 | tr 'a-z' $( echo {a..z} | sed -r 's/ //g' | sed -r "s/(.{$1})(.*)/\2\1/" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment