18.04 – Problem solving script – Use of appropriate variable

I am trying to execute the following script:

#! / bin / bash

# Configuration of ROT combinations as variables to call.
ROT_1 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / bcdefghijklmnopqrstuvwxyzaBCDEFGHIJKLMNOPQRSTUVWXYZA / & # 39;)
ROT_2 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / cdefghijklmnopqrstuvwxyzabCDEFGHIJKLMNOPQRSTUVWXYZAB / & # 39;)
ROT_3 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / defghijklmnopqrstuvwxyzabcDEFGHIJKLMNOPQRSTUVWXYZABC / & # 39;)
ROT_4 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / efghijklmnopqrstuvwxyzabcdEFGHIJKLMNOPQRSTUVWXYZABCD / & # 39;)
ROT_5 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / fghijklmnopqrstuvwxyzabcdeFGHIJKLMNOPQRSTUVWXYZABCDE / & # 39;)
ROT_6 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / ghijklmnopqrstuvwxyzabcdefGHIJKLMNOPQRSTUVWXYZABCDEF / & # 39;)
ROT_7 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / hijklmnopqrstuvwxyzabcdefgHIJKLMNOPQRSTUVWXYZABCDEFG / & # 39;)
ROT_8 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / ijklmnopqrstuvwxyzabcdefghIJKLMNOPQRSTUVWXYZABCDEFGH / & # 39;)
ROT_9 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / jklmnopqrstuvwxyzabcdefghiJKLMNOPQRSTUVWXYZABCDEFGHI / & # 39;)
ROT_10 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / klmnopqrstuvwxyzabcdefghijKLMNOPQRSTUVWXYZABCDEFGHIJ / & # 39;)
ROT_11 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / lmnopqrstuvwxyzabcdefghijkLMNOPQRSTUVWXYZABCDEFGHIJK / & # 39;)
ROT_12 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / mnopqrstuvwxyzabcdefghijklMNOPQRSTUVWXYZABCDEFGHIJKL / & # 39;)
ROT_13 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM / & # 39;)
ROT_14 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / opqrstuvwxyzabcdefghijklmnOPQRSTUVWXYZABCDEFGHIJKLMN / & # 39;)
ROT_15 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / pqrstuvwxyzabcdefghijklmnoPQRSTUVWXYZABCDEFGHIJKLMNO / & # 39;)
ROT_16 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / qrstuvwxyzabcdefghijklmnopQRSTUVWXYZABCDEFGHIJKLMNOP / & # 39;)
ROT_17 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / rstuvwxyzabcdefghijklmnopqRSTUVWXYZABCDEFGHIJKLMNOPQ / & # 39;)
ROT_18 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / stuvwxyzabcdefghijklmnopqrSTUVWXYZABCDEFGHIJKLMNOPQR / & # 39;)
ROT_19 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / tuvwxyzabcdefghijklmnopqrsTUVWXYZABCDEFGHIJKLMNOPQRS / & # 39;)
ROT_20 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / uvwxyzabcdefghijklmnopqrstUVWXYZABCDEFGHIJKLMNOPQRST / & # 39;)
ROT_21 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / vwxyzabcdefghijklmnopqrstuVWXYZABCDEFGHIJKLMNOPQRSTU / & # 39;)
ROT_22 = $ (sed & # 39; and / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / wxyzabcdefghijklmnopqrstuvWXYZABCDEFGHIJKLNOPQRSTUV / & # 39;)
ROT_23 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / xyzabcdefghijklmnopqrstuvwXYZABCDEFGHIJKLNOPQRSTUVW / & # 39;)
ROT_24 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / yzabcdefghijklmnopqrstuvwxYZABCDEFGHIJKLMNOPQRSTUVWX / & # 39;)
ROT_25 = $ (sed & # 39; y / abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ / zabcdefghijklmnopqrstuvwxyZABCDEFGHIJKLMNOPQRSTUVWXY / & # 39;)

#Tool Banner ASCII From: http://patorjk.com/software/taag/
echo "$ (tput -T xterm setaf 2) ▓█████ ▄▄ ██ ▄█▀"
echo "$ (tput -T xterm setaf 2) ███▄ ██▄█▒"
echo "$ (tput -T xterm setaf 2) ▓██▓██▄█▄█▒▒████▒▒██▒▒██▒▒██▒▒██▒▒██▒▒▒ ▒ ▒██ ▀█▄ ▓███▄ hung "
echo "$ (tput -T xterm setaf 2) ▒██▀▀█▄▒██▒██░██░░▓██▓▓██▓ ▄▄▄▄██ ▓██ █▄"
echo "$ (tput -T xterm setaf 2) ██▓██▓▒██▒████▓▒████▓▒▒██▒▓█▓█▓█▓█▓█▓█▓ █▓█▓█▓█▓█▓█▓█▓█ ██▒▓█ ▓██▒▒██▒ █▄ "
echo "$ (tput -T xterm setaf 2) ░ ▒▓ ▒▓▒▓░░░░▒▒▓▒▓▒▓▒▓▒▒▒▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓ ▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓ ▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓▒▓ ▓▒█ ° ▒▒ "
echo "$ (tput -T xterm setaf 2) ▒▒▒▒▒ ░▒▒▒▒ ░ ░ ░ * ░ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
"░ put T ░ ░ et echo, echo, echo, echo, echo, eta, eta, eta, eta, eta, eta, eta, eta, eta
echo "$ (tput -T xterm setaf 2)" ░ 1 1 ░ 1 1 1 1 ... 9
echo "$ (tput -T xterm setaf 2) -------- For tREEs $ (tput -T xterm sgr0)"

# Set input directory.
read -p "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] Directory of the destination file: "file_dir
read -p "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] List this directory [Y/N]: "yn

case $ yn in
      [Yy]*) cd $ file_dir; echo "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)]"Contents of the directory :; ls ;;
      [Nn]*) ;;
*) echo "No entry was detected!"; exit;;
that C

# Configure input file and decrypt.
read -p "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] Name of the file to encrypt / decrypt: "file_name
echo "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] List of 25 possible turns ... "
echo ""
echo "ROT 1"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_1
echo ""
echo "ROT 2"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_2
echo ""
echo "ROT 3"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_3
echo ""
echo "ROT 4"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_4
echo ""
echo "ROT 5"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_5
echo ""
echo "ROT 6"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_6
echo ""
echo "ROT 7"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_7
echo ""
echo "ROT 8"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_8
echo ""
echo "ROT 9"
echo "$ (tput -T xterm setaf 1) ----- $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_9
echo ""
echo "ROT 10"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_10
echo ""
echo "ROT 11"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_11
echo ""
echo "ROT 12"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_12
echo ""
echo "ROT 13"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_13
echo ""
echo "ROT 14"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_14
echo ""
echo "ROT 15"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_15
echo ""
echo "ROT 16"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_16
echo ""
echo "ROT 17"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_17
echo ""
echo "ROT 18"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_18
echo ""
echo "ROT 19"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_19
echo ""
echo "ROT 20"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_20
echo ""
echo "ROT 21"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_21
echo ""
echo "ROT 22"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_22
echo ""
echo "ROT 23"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_23
echo ""
echo "ROT 24"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_24
echo ""
echo "ROT 25"
echo "$ (tput -T xterm setaf 1) ------ $ (tput -T xterm sgr0)"
cat $ file_name | $ ROT_25

# Exit the tube to the file menu.
read -p "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] Output from pipe to file? [Y/N]: "ans
case $ ans in
    [Yy]*) ;;
    [Nn]*) echo "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] In agreement. Leaving Script. "; Exit ;;
*) echo "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] No entry detected Leaving Script. "; Exit ;;
that C

# Set Save Directory and Save Name.
echo & # 39; $ (tput -T xterm setaf 1) WARNING: $ (tput -T xterm sgr0) Do not end filepath with "/".'
read -p "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] Directory to save results: "save_dir
cd $ saveir
read -p "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] Name your file: "save_name

# Create output file form and save data formula.
echo "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] Writing file ".
echo "ROT CIPHER CHECK - RESULTS - $ (date)" >> $ save_name.txt
echo "------------------------------------------------ ---------- ">> $ save_name.txt
echo "INPUT FILE = $ file_dir $ file_name" >> $ save_name.txt
echo "" >> $ save_name.txt
echo "ROT 1" >> $ save_name.txt
echo "-----" >> $ save_name.txt
cd $ file_dir
echo "" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_1 >> $ savedir / $ save_name.txt
echo "ROT 2" >> $ saveir / $ save_name.txt
echo "-----" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_2 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 3" >> $ saveir / $ save_name.txt
echo "-----" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_3 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 4" >> $ saveir / $ save_name.txt
echo "-----" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_4 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 5" >> $ saveir / $ save_name.txt
echo "-----" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_5 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 6" >> $ saveir / $ save_name.txt
echo "-----" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_6 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 7" >> $ saveir / $ save_name.txt
echo "-----" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_7 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 8" >> $ saveir / $ save_name.txt
echo "-----" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_8 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 9" >> $ saveir / $ save_name.txt
echo "-----" >> $ savedir / $ save_name.txt
cat $ file_name | $ ROT_9 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 10" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_10 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 11" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_11 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 12" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_12 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 13" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_13 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 14" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_14 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 15" >> $ savedir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_15 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 16" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_16 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 17" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_17 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 18" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_18 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 19" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_19 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 20" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_20 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 21" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_21 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 22" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_22 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 23" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_23 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 24" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_24 >> $ saveir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt
echo "ROT 25" >> $ saveir / $ save_name.txt
echo "------" >> $ saveir / $ save_name.txt
cat $ file_name | $ ROT_25 >> $ savedir / $ save_name.txt
echo "" >> $ savedir / $ save_name.txt

# Save confirmation message and exit.
echo "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] Full transfer. "
echo "[$(tput -T xterm setaf 1)*$(tput -T xterm sgr0)] Leaving Tool Instance ".

But it will not work.
The initial sed variables do not seem to pass.

Is there something that I lack in theory here?