read command

Hello guys,
I am trying to a script that reads from key board and use the entered value in the next step.

Example: enter folder name

read $folder (i will give work)
 
cd /main/$folder/
pwd

it should print /main/work

---------- Post updated at 03:31 PM ---------- Previous update was at 03:31 PM ----------

thanks in advance

I believe that your code should be

read folder

and not

read $folder