About
Docs
Files
Support
Index

Essentials
AutoDocs
Library functions
Cooperate
Process mastering
Debug
Own debugging kit
FGE
Smart modeid pick
Loader
Shared lib. loader
Macros
Helper macros
Structs
All the structures
Logs
Library changelogs
Tools
Progs baked inside

Tools
amiscreen0.3
ansifilter0.1
auto2guide0.1
ccfilter0.1
chipset0.1
cputype0.1
device640.1
dupfilter0.1
expandlogs0.1
findsm0.2
fmpp0.1
fsmount0.1
genanim0.3
gensymtab0.1
hashlab0.4
ktm0.6
linkpoint0.1
logo2ilbm0.1
lpradio0.1
lzwpack0.1
minism0.2
mkheader0.1
modeidctrl0.1
mss0.6
multisum0.3
newterm0.2
numconv0.1
palhack1.1
patmat0.1
pfr0.2
playamitape0.1
qdbflags0.1
qfill0.1
resmodinit0.2
sadctrl0.2
saveassign0.1
setanim0.2
systime0.1
tokendump0.1
uassign0.1
viewlogo0.1
waitback0.4
wrapmount0.1



P
A
T
M
A
T

patmat-0.1
-----------

---

This  little proggy allows to use  AmigaOS  patterns  for path  and/or file
resolving where this feature is not available. Main purpose of this program
is to help implement path/file level pattern matching in scripts.

---

NOTES:

[*]
Requires  68020(no FPU)+,  OS2.04(theoretically)+, 6+ kilos of free memory.

[*]
Please  note that no  'NameFromLock()'  is ever called  in order to resolve
path elements thus denested paths(like 'foo/bar///baz' => '//') will not be
resolved at all. I  do not consider this a problem since it does not matter
what directory will be visited during trip to the final object.

[*]
Environment variable $RC will be set to 5 whenever element is not a part of
filesystem. Also OBJECT/A will be printed to the output intact.

[*]
For your convinience i did rip a text from NDK that describes all available
tokens:

   ?       Matches a single character.
   #       Matches the following expression 0 or more times.
   (ab|cd) Matches any one of the items seperated by '|'.
   ~       Negates the following expression. It matches all strings that do
           not match the expression(aka ~(foo) matches all strings that are
           not exactly "foo").
   [abc]   Character class: matches any of the characters in the class.
   [~bc]   Character class: matches any of the characters not in the class.
   a-z     Character range(only within character classes).
   %       Matches 0 characters always(useful in "(foo|bar|%)").
   *       Synonym for "#?", not available by default in  2.0. Available as
           an option that can be turned on.

---

HELP:

   > patmat ?

     OBJECT/A,Q=QUOTE/K



   OBJECT/A   -  Pathname/filename to be pattern matched. Each path element
                 can contain patterns.

   Q=QUOTE/K  -  Character(s)  to be used  as quotes  around  the OBJECT/A.

---

USAGE:

   ; Instead of typing full name you can run 'ScreenMode' like this
   run `patmat sys:prefs/sc#?e q "*""`

   ; Suppose that some directory contains other directories that do
   ; recurse really deep(first/second/third/fourth/fifth/sixth) and
   ; each directory is lonesome
   patmat first/*/*/*/*/*

   ; Match the very first object in temporary directory given it is
   ; not a Command-#? file
   patmat T:~(Command-#?)
   
---
megacz
    

























No more fear cus pure HTML is here!
Copyright (C) 2013-2014 by Burnt Chip Dominators