#!/bin/bash # # author.....: zogs # email......: zogs@anche.no # title......: bash script with perl hack inclusion for cyrpt/decrypt tricks # # http://www.autistici.org/c0de # case "$1" in crypt) echo "insert string..:"; read st cp='s/(.)/chr(ord($1)+3)/ge' echo "" echo "result.........:" echo $st | perl -pe $cp ;; decrypt) echo "insert string..:" read st cd='s/(.)/chr(ord($1)-3)/ge' echo "" echo "result.........:" echo $st | perl -pe $cd ;; *) echo "usage: arigato.sh [ crypt | decrypt ]" ;; esac