Re: Solaris 10: Catching errors of builtin "cd" command in "/bin/sh"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Paul Eggert:

> +@evindex OLDPWD
> +@evindex PWD
> +POSIX says that a successful @command{cd} updates the values of the
> +@env{OLDPWD} and @env{PWD} variables, and that @command{cd -} acts like
> +@command{cd $OLDPWD}.  Older shells, such as Solaris 10
> +@command{/bin/sh}, do not support this and portable scripts should not
> +rely on it.

I think this should be @command{cd "$OLDPWD"}, to match POSIX and common
sense.

Thanks,
Florian





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux