[TUHS] Shell control through external commands

Dario Niedermann dnied at tiscali.it
Sat Sep 10 17:45:08 AEST 2016


Il 15/07/2016 alle 14:27, Norman Wilson ha scritto:

> Just for the record, Fedora 21 supplies /bin/cd, as part
> of package bash-4.3.42-1.  Interestingly, it is a shell
> script:
> 
> lu$ cat /bin/cd
> #!/bin/sh
> builtin cd "$@"
> lu$ 

But doesn't this change the current dir only in the child shell?
Which then exits right after the second line, parent shell's $PWD
unaffected. I really don't see how this script is useful.



More information about the TUHS mailing list