|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: @ T w
Length: 718 (0x2ce)
Types: TextFile
Notes: @(#)which.csh 13.1 (RC International) 91/02/02
Names: »which«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦a83e7cf70⟧ »0003«
└─⟦this⟧ »./usr/ucb/which«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/ucb/which«
#! /bin/csh
#
# @(#)which.csh 13.1 (RC International) 91/02/02
#
# @(-)which.csh 4.2 (Berkeley) 83/02/14
# which : tells you which program you get
#
set noglob
foreach arg ( $argv )
set alius = `alias $arg`
switch ( $#alius )
case 0 :
breaksw
case 1 :
set arg = $alius[1]
breaksw
default :
echo ${arg}: " " aliased to $alius
continue
endsw
unset found
if ( $arg:h != $arg:t ) then
if ( -e $arg ) then
echo $arg
else
echo $arg not found
endif
continue
else
foreach i ( $path )
if ( -x $i/$arg && ! -d $i/$arg ) then
echo $i/$arg
set found
break
endif
end
endif
if ( ! $?found ) then
echo no $arg in $path
endif
end