I am trying to write a simple shell script where on running this script it should change to another directory. I want to make it by allocating a variable to the path. vi loc_change
#!/bin/bash
change= "/home/oracle/Public"
cd $change
echo "directory changed"
after doing this I have changed the permissions
chmod 777 loc_change and executing this source ./loc_change after executing this I am getting following error.
./loc_change: line 2: /home/oracle/Public: is a directory
directory changed
I have seen this type of decleration in tldp. I am very new to Shell scripting.