Subject: Re: Strange behavior of 'cd' command
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 01/31/2003 17:08:42
> 
> The command was :
> 	cd test | grep blah
<snip>
> All is running like that but, the directory is not changed.
<snip> 
> can it be the the shell is really smart and just doesn't run the command as
> he find-out there will be no output ?

This the expected behaviour, the '|' causes the 'cd' builtin to
be run in its own shell execution environment (ie the shell forks
before doing the cd) so it has no effect on the outer shell.

	David

-- 
David Laight: david@l8s.co.uk