Re: cd in a Shell Script

2002-03-30 Thread Harry Putnam
The Gyzmo [EMAIL PROTECTED] writes: Hello. I've written a short shell script to change my directory and display the contents at once because I'm sick of having to do 'cd dir' then 'ls -l'. My problem is that once the program is done executing, my directory remains the same. Here's my

Re: cd in a Shell Script

2002-03-30 Thread Harry Putnam
Harry Putnam [EMAIL PROTECTED] writes: The Gyzmo [EMAIL PROTECTED] writes: Hello. I've written a short shell script to change my directory and display the contents at once because I'm sick of having to do 'cd dir' then 'ls -l'. My problem is that once the program is done executing, my

Re: Re: cd in a Shell Script

2002-03-30 Thread Ray Curtis
hp == Harry Putnam [EMAIL PROTECTED] writes: hp Harry Putnam [EMAIL PROTECTED] writes: The Gyzmo [EMAIL PROTECTED] writes: Hello. I've written a short shell script to change my directory and display the contents at once because I'm sick of having to do 'cd dir'

RE: cd in a Shell Script

2002-03-30 Thread Kevin Krieser
You can source any text file. It doesn't have to start with a period. However, the reason it doesn't work with a file called test is because test is a shell builtin command. Useful in if statements: if test $VAR = I then ... fi , though normally, the [ command is used instead for the same

Re: cd in a Shell Script

2002-03-30 Thread Bill Crawford
On Sat, 30 Mar 2002, Harry Putnam wrote: It has to be a dot file. A file who's name begins with `.' Try .test. Maybe someone here can explain why it doesn't work in a file named `test' but does in .test? For some reason it tries to source the binary test in /usr/bin ... try renaming

RE: cd in a Shell Script

2002-03-30 Thread Bill Crawford
On Sat, 30 Mar 2002, Kevin Krieser wrote: You can source any text file. It doesn't have to start with a period. However, the reason it doesn't work with a file called test is because test is a shell builtin command. Useful in if statements: bzzt! It's when there is a binary of the same

Re: cd in a Shell Script

2002-03-30 Thread Harry Putnam
Bill Crawford [EMAIL PROTECTED] writes: From: Bill Crawford [EMAIL PROTECTED] Subject: RE: cd in a Shell Script To: [EMAIL PROTECTED] Date: Sun, 31 Mar 2002 05:09:26 +0100 (BST) Message-ID: [EMAIL PROTECTED] On Sat, 30 Mar 2002, Kevin Krieser wrote: You can source any text file

Re: cd in a Shell Script

2002-03-30 Thread Harry Putnam
Bill Crawford [EMAIL PROTECTED] writes: On Sat, 30 Mar 2002, Harry Putnam wrote: It has to be a dot file. A file who's name begins with `.' Try .test. Maybe someone here can explain why it doesn't work in a file named `test' but does in .test? For some reason it tries to source the