Bourne Shell Question?

Leo de Wit leo at philmds.UUCP
Thu Feb 2 21:46:13 AEST 1989


In article <8517 at dasys1.UUCP> dap9702 at dasys1.UUCP (Dan Powers) writes:
|Hi All,
|  Does anyone know how to get a prompt in Bourne Shell that contains the
|current working directory (pwd).

If you can cope with a somewhat wierd syntax, you could do it this way:

[/usr/dan] $c bin $d
[/usr/dan/bin]

The c and d are environment variables that are set up this way:

c='eval cd'
d='; PS1="[`pwd`] "'
export c d PS1

You can stick this in your .profile or in a file you . from within .profile.

      Leo.



More information about the Comp.unix.questions mailing list