[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: shell programming
- From: ABrady <kcsmart kc rr com>
- To: redhat-list redhat com
- Subject: Re: shell programming
- Date: Sat, 19 May 2001 02:06:47 -0500
On Sat, 19 May 2001 00:52:07 -0600 (MDT) JASON W ELLIOT
<jelliot math cudenver edu> spake unto us:
> Hi. I'm a newbie at shell programming. I'm trying to write a script that
> will (among other things) cd to a directory, but the cd command doesn't
> work. I get no errors; it's as if the command is not in the script.
>
> Does anyone know how to get this to work?
>
> Thanks,
How do you know it isn't getting to the directory? If you expect it to be
in that directory when the script stops, I think you'll be disappointed
because (in all that I've ever created, anyway) it always returns from
whence it started when the script completes. A simple way to test it would
be:
#!/bin/bash
cd /<somedir>
touch testfile
Then take a look in /<somedir> and see if testfile exists.
If that isn't what you are getting at and I have it all wrong, kindly
ignore me and I'll be quiet again. Unless, that is, you care to elaborate
enough that I feel compelled to take another stab at it.
--
The three Rs of Microsoft support: Retry, Reboot, Reinstall.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]