Strange... I just copied your script and then make a dir copy in my $HOME and then ran it, and it worked fine.
I'm also using RH 8 but I haven't ran any updates on my dist. -----Original Message----- From: Ron Franke [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 3:54 PM To: [EMAIL PROTECTED] Subject: Strange Bash Script Behavior -- Doesn't Recognize $variable in cd Statement 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]$ -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list ----------------------------------------------------------------------- Unless otherwise expressly stated, this message does not create or vary any contractual relationship between you and ARC International. The contents of this e-mail may be confidential and if you have received it in error, please delete it from your system, destroy any hard copies and telephone the above number. Incoming emails to ARC may be subject to monitoring other than by the addressee. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list