System V questions

Guy Harris guy at auspex.auspex.com
Wed Jan 3 14:30:38 AEST 1990


 >About getting the prompt to show your current working directory,  try this:
 >
 >PS1='${PWD##}'
 >
 >About the alias, try this:
 >
 >alias dir=ls -l

Sounds like you're using the Korn shell which is not a standard part of
System V Releases 3.0 or 3.1; it's standard in 4.0 (along with the C
shell, based on the SunOS 4.1 one which is based on the 4.3BSD one and
which therefore supports "alias" just like the original poster's BSD
system), and maybe in some other versions.

If all you have is the Bourne shell, there may be other ways to get the
current working directory (I've seen some, I think, but they're a bit
complicated), and you can get things like the "dir" alias with shell
functions.  You can't use the above methods, though, not in a vanilla
Bourne shell.

However, some S5 systems do come with the C shell (S5R4, as indicated,
and apparently S5R3.2, at least for the 386).



More information about the Comp.unix.questions mailing list