01:34 pm, 6 Mar 06
csplit
Somehow I missed seeing this part of GNU coreutils before:
So useful! I actually discovered it when looking around thinking there had to be a utility that did what I needed. I've already used it for two separate problems in the past two days.
csplit - split a file into sections determined by context lines
So useful! I actually discovered it when looking around thinking there had to be a utility that did what I needed. I've already used it for two separate problems in the past two days.
$ csplit rfc3920.txt "/^[0-9]/" "{*}"
Two funny loops
1. The full name of GHC is GGHC: the Glorious Glasgow Haskell Compiler. It used to be that part of the work of the compiler had to be delegated to a tool written in Perl; this was called the Evil Mangler. At some point bootstrapping evolved so that this was no longer necessary: glory.1a. Now pugs uses GHC to bootstrap a Perl 6 compiler.
2. In the nineties, Perl style regular expressions take over the world (or something). Everybody likes them, even if they hate Perl. PCRE, Perl Compatible Regular Expressions, is a c library copying almost all the features from P5's RE engine.
2a. Pugs links against PCRE to provide Perl 5 compatible regexps.
...Perl 6 gives a redesigned version of REs, different enough that they are now called something else. They are a lot like Parsec; you can very easily combine them and arrange them in reusable grammars.
I recently found seq and tsort as well -- not super important but nice to have around.
for i in `seq 1 8`; do some proccessing using $i; done