Re: xorriso: how to find fixed-string filenames?
Hi,
i now understand why command -ls is not what you need:
It warns if any of the given files is missing.
You want a warning if all given files are missing.
So i implemented two new -find tests:
-use_pattern "on"|"off" : This pseudo test controls the
interpretation of wildcards with tests -name, -whole_name, and
-disk_name. Default is "on". If interpretation is disabled by
"off", then the parameters of -name, -wholename, and -disk_name
have to match literally rather than as search pattern. This
test itself does always match.
-or_use_pattern "on"|"off" : Like -use_pattern, but
automatically appending the test by -or rather than by -and.
Further the test itself does never match. So a subsequent test
-or will cause its other operand to be performed.
I do not see a need to distinguish between iso_rr files and disk files.
If the user wants a particular setting for the next test, then this
can be done immediately before it by inserting one of above pseudo
tests.
The logical operator before the next test decides which of both
pseudos is more appropriate:
-test1 [-and] -use_pattern off [-and] -test2
or
-test1 -or_use_pattern off -or -test2
Your example could look like
xorriso -indev image.iso -return_with WARNING 32 -report_about WARNING \
-find / -use_pattern off \
-wholename "$name1" -or -wholename "$name2" -exec lsdl
One could also use patterns and non-patterns mixed
-find / -use_pattern off -wholename "$name1" \
-or_use_pattern on -or -wholename "$name2"'*' \
-or_use_pattern off -or -wholename "$name3"
-------------------------------------------------------------------------
This feature is now in the SVN of libisoburn.
I plan to upload a new development tarball of GNU xorriso, when we
have discussed your other wish (about extraction) and i eventually
have implemented some solution.
Ping me if you want to try the new -find tests first.
Have a nice day :)
Thomas
Reply to: