Results 1 to 4 of 4
Hello,
My script below doesn't work because of the dot in the directory name. Does anybody know the workaround?
#!/bin/bash
DIR=/home/google.com/
cd $DIR...
- 04-04-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 2
BASH: dot in directory name?
Hello,
My script below doesn't work because of the dot in the directory name. Does anybody know the workaround?
#!/bin/bash
DIR=/home/google.com/
cd $DIR
- 04-04-2007 #2
---------
Originally Posted by adamcannon
hi that a good question
try this....
DIR=/home/google.com/
cd $DIR
pwd
-----------
it did work -what actually happens...
sh test.sh --i assume test.sh is your script name
when run ur script -shell creates child process and which goes to the google.com dir and u got nothing to there...-
then the child process terminates and comes back to old parent shell.
It has nothing to do with dot in ur directory name- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 04-04-2007 #3Just Joined!
- Join Date
- Apr 2007
- Posts
- 2
Adding a "pwd" to the script isn't going to help
- 04-04-2007 #4
Actually what i mean is ...
cd $dir
is working....u can change into another directory with ur script.
it's indeed in /home/google.com directory try and check out with ls or pwd.
it display content of /home/google.com
Thanks- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote