csh(bash 및 sh에서 사용됨)의 "type"에 해당하는 것은 무엇입니까?

csh(bash 및 sh에서 사용됨)의 "type"에 해당하는 것은 무엇입니까?

명령어가 내장되어 있는지, 아니면 별도의 프로그램이 있는지 확인하고 싶습니다. 그리고 sh나는 bash다음을 사용합니다:

$ type <command>

무엇과 동일합니까 csh?

답변1

csh에는 "which"가 있습니다(sh 별칭을 감지할 수 없음).

내 환경에서 tcsh 사용하기

~ (101) alias
cd      cd !* ; ls
q       exit
v       cursor; xhost + ;resize -s 40 80; unsetenv TERMCAP; screen
xl      xlock -nolock -random
y       Xearth; run xclock -geometry +1100+0; run nice xload -geometry +950+0 -update 3
~ (102) which y
y:       aliased to Xearth; run xclock -geometry +1100+0; run nice xload -geometry +950+0 -update 3
~ (103) type which
type: Command not found.
~ (104) which which
which: shell built-in command.
~ (105) which ls
/bin/ls
~ (106) 

답변2

이것을 시도하면 다음과 같이 표시됩니다.

$ csh
% type type
type is a shell builtin

그럼..네 그럴 수 있나요?

관련 정보