@Gilles Note that LuaTeX is a bit of a game-changer. For the first time, there is a TeX engine with actual scripting capabilities, courtesy of the Lua project.
I'm not really a Lua fan, but half a loaf is better than none, as the saying goes. Perhaps even in French.
@FaheemMitha TeX is pretty much out if you want people who aren't familiar with it to edit the document
It's also inconvenient for some things, although luatex (which I've never used) might be an improvement. For technical documentation, it's important to have good indexing, and in tex that's awkward, has to go through an external tool
Also for technical documentation there's often a requirement of having HTML output, which is difficult when it comes from tex
@Gilles That's historically true. Though I think that Lua might make a better job of HTML conversion than other tools. But thus far I've only seen proofs of concept.
@Gilles Oh. I don't think I know makeindex. I've used BibTeX.
@Gilles Yes, I see.
Historically it's also been impossible (or at any rate, very difficult) to get TeX to talk to a database. It's now possible (actually quite easy) with LuaTeX. Which is useful.
Hmm. Just did a search for makeindex/xindy. I guess I've never needed to create an index.
@clemens No, and I hadn't heard of spreadtab, either, so thank you. But can it be useful for what I want to do? At first glance I don't see anything that would help with collecting data from multiple cells in the same row. — GillesJan 18 '17 at 22:30
In a documentation application, where the version history of the document is listed in a tabular environment, I'd like to be able to silently extract the value of the last version number supplied, to use elsewhere. The people who type in the metadata can't (and shouldn't be able to) add markup to...
Obviously, for something like this, it's better to work with a scripting language that can actually do calculations. Try to get TeX to do numerical calculations is like trying to get an ostrich to play the cello.
@Fabby About your answer there: are you familiar with the --write-mostly option to mdadm? It is apparently designed to help when mirroring to slow devices, by making Linux only read from them when absolutely necessary. (I don't have enough time to add an answer to that question right now).
@fra-san Not familiar with mdadm at all actually. Will read some more and edit that in.
(I've got more of a "throw hardware at it" approach to RAID than "use software that can crash and take the entire array with it")
P.S. Grazie!
@fra-san Ouch!--write-mostly goes hand-in-hand with --write-behind so I'd rather not advise that to an OP who clearly had very little Unix (nor hardware) experience...
@Fabby Stephen has been faster than me... If the user understands and accepts the risk, --write-mostly can also enable write-behind (as far as I can tell it needs an intent bitmap). But by default write-mostly does not imply write-behind.
@fra-san @StephenKitt edited and credit given in Note 2: Thanks to fra-san and Stephen Kitt for pointing me in the right direction for the second option!
@FaheemMitha Both return statements could be removed from the "UNIX Shell" code. Also, since it looks like that is actually bash (not sh), it would be enough with iseven () { ! (( $1 % 2 )); }
@Kusalananda , when you looked at the question did you get `[1, 1, 1, 1] [0, 0, 0] [1, 0, 0] [0, 0, 0]` as the desired output using the poster's logic?
I ignored the decimals because I think it is a mistake
As the example data was inconsistently changing in the number of columns (and that floating point number), and since the user replied to me in comments saying basically "that's the way it should be", I decided not to try to understand it.
No, a regular expression only matches some string from another string. You can never do something like that with only a regular expression. You could possibly use sed or awk or perl or something and use regular expressions together with the language to do the needed substitutions.
I would like to find and replace the first column of matched lines with a character and non-matched lines with another character and then do the same with the subsequent column and so on until the desired output using regex script (I am using EmEditor), for instance,
I have the following:
123,12...