csplit - Split a batch of text files using pattern -
I have a directory of about one thousand HTML files. Depending on the recurring pattern (a title), each file has multiple text Files must be split into. I'm on a window machine using the GnuWin32 tool.
I have found a way to do this for a file:
csplit 1.html -b "% 04d.txt" / "In the word headline" / {*}
But I do not know how to completely repeat this operation on a set of HTML files. This:
csplit * .html -b "% 04d.txt" / "word title" / {*}
is not working , And this does not do the same:
for in% i (* .html) csplit * .html -b "% 04d.txt" / "in word title" / { *}
Both the result of an invalid pattern error will be greatly appreciated!
option / logic is important with the command csplit
. And it will not accept multiple files This helps you get there:
% csplit --help Usage: csplit [options] ... file pattern ...
me It is a surprise that your first example works for a single file, it must be changed to:
% csplit -b "% 04d.txt" 1.html "/ word / top /" "{ *} "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ Opera / ergus file pattern
Also note that I changed your quote into around arguments. You may also need to quote your last "{*}"
.
I'm not sure which shell you are using, but if the loop syntax is appropriate, then the fixed command should work in the loop.
Comments
Post a Comment