#!/bin/bash
selection=
until [ "$selection" = "0"]; do
echo ""
echo "PROGRAM MENU"
echo "1 - Encrypt text with Rot13"
echo "2 - DEcrypt text with Rot13"
echo ""
echo "0 - Exit program"
echo ""
echo -n "Enter Selection:"
read selection
echo ""
case $selection in
1 ) echo "Line to be encrypted"
rot13 "a-z"
2 ) echo "Line to be decrypted"
rot13 "n-za-m"
3 ) exit;;
* ) echo "Please enter 1,2, or 0"
esac
done
.txt ファイルを読み取り、暗号化して保存し、その後復号化したいと考えています。