On Thu, 2003-04-03 at 17:54, Ron Franke wrote: > Hi: > > I'm having a strange problem with a bash script when trying to cd with a > $variable. A simple example script follows. The issue is on the line > with cd ${copydir}. I'm wondering if there is a bash issue or something > in my environment that I'm missing. I have RedHat 8.0 and use the update > service and have picked up all updates, I believe. > > Your thoughts on this would be appreciated. > > Ron > > > #!/bin/bash > > copydir=/home/ron/copy/ > echo ${copydir} > > pwd > cd copy > pwd > cd .. > pwd > cd ${copydir} > pwd > cd ~ > pwd > > > The following is output from the script with the error > > [EMAIL PROTECTED] ron]$ test.sh > /home/ron/copy/ > /home/ron > /home/ron/copy > /home/ron > : No such file or directoryme/ron/copy/ > /home/ron > /home/ron > [EMAIL PROTECTED] ron]$ >
There must be some funny non printing char in there somewhere. I cut and pasted right from your email and changed the dir and it worked fine. It might not be a bad idea to quote the string. as a rule I do. Bret -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list