On unix file globbing is not an OS function but that of the shell.
Different shells glob in different ways. Basically there are two flavors
of globbing, C-shell and SH.
On windows, it appears that it is a function of the OS, that programs
can use. One popular glob is the renaming of files. E.g. move *.x *.y,
change the extension x to y. Unix has no notion of this, but instead
each glob is handled individually, not as parallel arrays.
Ordering of * also differs between shells and platforms.
Given that the syntax and semantics differs between shells and
platforms, what would your expectations be? What would a non-unix savy
windows user expect?
I don't think it would be that hard to add some sort of globbing but it
might not meet expectations.
In Him,
DM
On 04/11/2011 10:31 AM, David Haslam wrote:
As it does process individual files in Windows, I can write a CMD command to
process all the files matching a pattern. Something like this should work.
for %%f in (*.SFM) do perl %cwpl%\usfm2osis.pl %%f %%f
This should generate output files with dotty "extension"s viz.
filename.SFM.osis.xml
But that would be for the "Stage 1" chore - checking that each USFM can be
converted to valid OSIS.
The point is that once these checks on individual files are done, the same
Perl program should be able to make a single output OSIS file for the whole
Bible translation.
Hence the need to "glob" the wildcards within the Perl script.
> From a Google search, I found that globbing wildcards for Windows is a
frequently encountered problem for users of Perl.
David
NB. cwpl is the environment variable pointing to where I downloaded the
CrossWire Perl utilities.
--
View this message in context:
http://sword-dev.350566.n4.nabble.com/Re-Using-Perl-script-usfm2osos-pl-in-Windows-tp3441964p3442134.html
Sent from the SWORD Dev mailing list archive at Nabble.com.
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page