0

So, I have this code here for linux bash which i hope to use for a simple Caesar cipher, and after many hours of trial and error, I decided to try and find a solution on here, even though this question has been asked many times I cannot seem to find what I am doing wrong. Here is the code.

    #!/bin/bash
read -p 1
if [ "$1" == "E" ]
then 
read word
echo $word | tr '[A-Z]' '[X-ZA-W]'
elif [ "$1" == "D" ]
then 
read word
echo $word | tr '[X-ZA-W]' '[A-Z]'
else
echo "Unsupported command"
fi

errors here

security.txt: line 3: [: missing ]' security.txt: line 7: [: missing]'

0 Answers0