a useful alias

root at homer.UUCP root at homer.UUCP
Thu Jul 31 07:11:00 AEST 1986


this is an alias i've been using for a long time that i find very
handy.  just thought i'd share it.  it will allow you to specify a
directory to cd to by naming its intitals only.  for example, to cd to
the directory "/usr/fred/memos/archives/mary", type "c ufmam".

if the initials are not unique (more than one directory has those
initials), an error will result.  if sucessful, the pathname that the
initials expanded to will be echoed, and you will be cd'd.

enjoy.

alias c 'set d=`echo \!^* | sed "s/./\/&*/g"`; cd $d || echo $d'
-----
						marc brumlik

				 ...trsvax!hal6000!unify1!\
							   >homer!marc
					    ...ihnp4!sys1!/



More information about the Comp.sources.unix mailing list