Qual é o equivalente de 'type' (usado em bash e sh) em csh?

1

Eu quero verificar se um comando está embutido ou um programa separado. Em sh e bash eu uso:

$ type <command>

Qual é o equivalente em csh ?

    
por elbarna 13.08.2016 / 00:40

2 respostas

2

csh tem "qual" (que não pode detectar aliases sh)

No meu ambiente usando 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) 
    
por 13.08.2016 / 00:45
1

Basta tentar isso:

$ csh
% type type
type is a shell builtin

Então, sim, você pode?

    
por 13.08.2016 / 00:44

Tags