[Nottingham] Slow bash-ings for file line search
Martin
martin at ml1.co.uk
Tue Apr 5 23:44:00 BST 2005
Peter Chang wrote:
>
> [snipped]
>
>
>> if [ "$id" -ge "0" ]
>
>
> I don't understand this line. You start with id=0 and increment it so this
> test is always true.
True (:-))
But not always true. With the MS-headers crap, the id count can start
from "-2" for example to synchronise the two streams.
> The best way for doing this in awk is to go through the file and store
> lines that are between those markers and then on a transition point, spit
> out your tag and the stored lines.
Fair idea. They could easily be dumped to a tmp file and then appended
when ready.
I'll see how painful the present hack gets before rewriting.
Could be a good excuse to upgrade to a dual core Opteron (:-))
Cheers,
Martin
--
----------------
Martin Lomas
martin at ml1.co.uk
----------------
More information about the Nottingham
mailing list