home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
norge.freeshell.org (192.94.73.8)
/
192.94.73.8.tar
/
192.94.73.8
/
pub
/
computers
/
3b2
/
samedev
< prev
next >
Wrap
Text File
|
1985-07-02
|
567b
|
41 lines
set -ue
IFS="${IFS},"
if [ $# -lt 2 ]
then
echo "Usage: ${0} known_dev check_dev ..." >&2
exit 1
fi
eval `ls -l ${1} | \
(read perm links uid gid major minor month day when name ; \
echo perm=${perm} want=${major}/${minor})`
shift
case "${perm}" in
b*)
type=b
;;
c*)
type=c
;;
*)
echo "${0}: ${arg}: Not a block or character device" >&2
continue
;;
esac
ls -ld "$@" | while read perm links uid gid major minor month day when name
do
case "${perm}" in
${type}*)
if [ "${major}/${minor}" = "${want}" ]
then
echo "${name}"
fi
;;
esac
done