home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d8xx
/
d811
/
bsh.lha
/
bsh
/
whatis
< prev
next >
Wrap
Text File
|
1993-02-14
|
1KB
|
31 lines
local ___i ___n IFS="\n"
if !?$1
# a possible array of strings is combined into a single string by
# quoting the substitution. Double quotes are required for this
# to work, since no command substitution occurs between single
# quotes.
set ___i "`alias $1`" >NIL:
if strlen(___i)
echo "$1 is an alias, value = \"$___i\""
else
set ___i "`hash $1`" >NIL:
if strlen(___i)
echo "$1 is a hashed command, value = \"$___i\""
# elseif `echo $?$1`
# echo "$1 is an environment variable, value = \"`echo $1`\""
else
echo "$1 is undefined"
endif
endif
elseif ___n = \#$1
echo "$1 is an array, of $___n elements, value = "
___i = 0
repeat ___n 'echo "${1}[$___i] = \"`set ${1}[$___i]`\"";___i++'
else
echo "$1 is a simple variable, value = \"`set $1`\""
endif
# Whatis is presented as is; no warrantee is either expressed or implied
# as to it's suitability to any purpose whatsoever. You assume all the
# risk for all damage, even if caused by a defect in the software,
# no matter how awful.