System V questions

Christopher Cilley cc at wet.UUCP
Wed Jan 3 03:52:25 AEST 1990


In article <21916 at adm.BRL.MIL> herman%nrl.decnet at ccf3.nrl.navy.mil 
(NRL::HERMAN) asks:
>
> i) How can I get the prompt to show me the current directory.
>
> ii) Is there something available in System V which is equivalent to the 
>	'alias' command available in BSD UNIX.  That is, can one define 
>	symbols in a way similar to the way #define defines symbols in C.

I can pass along the answers for C-shell (/bin/csh).

	i) I have the following in my .cshrc in the home directory:

# The following sets your prompt to print out the current command number
# and working directory.
	alias	cd	' cd \!* ; set prompt = "`pwd` [\\!] " '
This will give output that looks like:
	/usr/local/lib/elm [23] <Your command here...>

	ii) You can set aliases by just putting them in the .cshrc
	    like this:
# Set local aliases.
	alias	h	cd $home
	alias	hi	history
	alias	chterm	'set TERM=\!* ; setenv TERM \!* ; tput init'
	alias	ll	ls -al
	alias 	llm	'ls -al \!* | less'
	alias	lc	ls -aCF
	alias	psa	ps -ef
	alias	mail	mailx
	alias	bye	logout
etc. etc.
-- 
----------     ----------     ----------     ----------     ----------
Christopher Cilley	{ucsfcca|claris}!wet!cc		cc at wet.UUCP
	"Life is uncertain - eat dessert first..."  -RJR



More information about the Comp.unix.questions mailing list