#!/bin/bash
index=99999;
choose=0;
while [[ $# -gt 0 ]]; do
case $1 in
-n)
shift
index=$1
;;
-u)
shift
choose=1
;;
esac
shift
done
if [[ $choose -eq 0 ]]; then
read stringLow
elif [[ $choose -eq 1 ]]; then
read stringHigh
fi
if [[ $choose -eq 0 ]]; then
echo ${stringLow:0:$index} | tr '[a-z]' '[c-za-b]'
elif [[ $choose -eq 1 ]]; then
echo ${stringHigh:0:$index} | tr '[A-Z]' '[C-ZA-B]'
fi