Subject: | |
From: | |
Reply To: | VANCE,JEFF (HP-Cupertino,ex1) |
Date: | Wed, 12 Mar 2003 13:53:33 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> 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 *
|
|
|