what is wrong with this easy script
- by alex
what is wrong with this easy script? I just want to write an script which change my directory:
A. I put below commands on the file witch its name is pathABC on the /home/alex directory,
#!/bin/sh
cd /home/alex/Documents/A/B/C
echo HelloWorld
B. also I did chmod +x pathABC , On the terminal when I am on the /home/alex directory,
I run ./pathABC .
But the output is just HelloWorld and the current directory remains with no change. I mean my directory remains as /home/alex and not go to the /home/alex/Documents/A/B/C.
So where is wrong?