HP3000-L Archives

March 2003, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Wed, 12 Mar 2003 13:53:33 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
> I wanted to know how to check to see if a file name fits the pattern
> IHOCS###, with ### being three numbers.  Is there a pattern matching
> function to do this?

John hit it with his pmatch() suggestion. Here is an untested script
fragment that should work:

  ...
  # assume $STDIN has been redirected to the output of LISTFILE,6 in
  # MPE syntax.
  setvar i finfo(hpstdin,'eof')
  while setvar(i,i-1) >= 0 do
     if pmatch("IHOCS###",word(input(),".")) then
        # this base filename matches, so ...
        # note: to make this script HFS aware just change the
        #       above line to:
        #       if pmatch("IHOCS###",basename(input())) then
     else ...
     endif
  endwhile

HTH,
  Jeff

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2