#!/bin/sh : List all system directories containing the argument : Author: Terrence W. Holm if test $Argc -ne 1 { echo "Usage: whereis name" exit 1 } setglobal path = '"/bin /lib /etc\ /usr/bin /usr/lib\ /usr/include /usr/include/sys'" for dir in [$path] { for file in [$dir/$1 $dir/$1.*] { if test -f $file { echo $file } elif test -d $file { echo $file/ } } } exit 0