[comp.sys.apollo] Aegis shell script.

bmptp@amdcad.AMD.COM (Trina Phan-Vu) (05/03/89)

Can someone help me with my Aegis problem? I recently attended
the class transition for SR10 ( which provided by Mentor Graphic
Co., we are using their workstation for our I.C. design CAD tools
and Mentor uses APOLLO as its hardware.. so much for that.). My
problem is that I am not familiar with AEGIS very much (we have
Unix on Mentor as well), the instructor in the class gave us a
small shell script and I certainly had lots of trouble with it. The
script is written as follows:
#!/com/sh
eon
#the list of files to check
check_list := ^1
#set up a temporary file
tf := "/tmp/chkpn.tmp"
catf /dev/null > ^tf
ld -c ^check_list | @
while read obj do
   # what type of file system object is it?
     ld -en -st -nhd ^obj | read sys_type pn
     if ((^sys_type <> 'file' and ^sys_type <> 'dir' ))
            then next endif
   # 
   # If it's a file ...
     if ((^sys_type = 'file' )) then           
      ld -en -tu -nhd ^obj | read type_uid pn
      if ((^type_uid <> 'uasc'and type_uid <> 'unstruct'))
             then next endif
      if ((^type_uid = 'uasc' )) then
              args "file uasc ^pn" >> ^tf
      endif
      if ((^type_uid = 'unstruct')) then 
              args " file unstruct ^pn >> ^tf
      endif
      else
  # else if it's a directory ...
      ld -st -tu -nhd ^obj/ ... | fpat 'file' | @
         fpat 'uasc' 'unstruct' >> ^tf
     endif
endo

I got the error message after running this program as:"semantic
error in "srn"(name of the script). The variable "^SYS_TYPE"
is undefined". I suspect it will also complain that ^type_uid
is also undefined as the script proceeds further later on after
the first error is fixed.
What exactly means "|@"? All I found from the manual is that "@"
is an escape, I don't understand the application of "@" in the
last sentence of "ld" command.
As you know that this program is reading a given directory and  
listing out the type of each file in that dir. to see which one
is unstruct type and which one is 'uasc' type.
Please help about the variable that is undefined. How can correct
the error message?. Thank you so much. Trina.