[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Portable equivalent of "type -p"?



Joost wrote:
> What's wrong with "which", from the (priority: requred) debianutils
> package?

It uses bash's 'type -p' also:

$ dpkg -l debianutils
Desired=Unknown/Install/Remove/Purge
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name            Version        Description
+++-===============-==============-============================================
ii  debianutils     1.6            Miscellaneous utilities specific to Debian.
$ file /usr/bin/which
/usr/bin/which: Bourne-Again shell script text
$ cat /usr/bin/which
#!/bin/bash
unalias -a
unset -- "$@" &> /dev/null
enable -n -- "$@" &> /dev/null
type -p "$@"

-- 
Poor pet names # 37: Chuck      "Sit up, Chuck.  Up, Chuck.  Good boy."

Noel Maddy <nmaddy1@biostat.hfh.edu>



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: