May. 27th, 2005

issaferret: (Default)
Unix is designed around text manipulation tools like vi, sed, awk, tr, cut, and so on. I rely on these tools to let me do my job, which largely involves taking a bunch of ASCII characters and making them mean something.

Yesterday evening I was provided a lesson in the limitations of these tools.

I've been working towards building every package I use on Sun 64-bit. Sometimes this confuses packages, since you have to keep both 32 and 64 bit versions around, so I have to go in and manually edit the Makefiles and suchlike.

So I cracked open the Makefile for PHP to manually change the library locations for my LDAP libraries. 'Line too long', it said. Huh. So I grabbed sed and told it to make the changes I wanted. PHP wouldn't build - something wrong with the final command line. So I went in and tinkered further, got very confused for a while, and finally realized something: vi and sed both have a 4096-character limit on how long a line can be. Sed was just very polite and merrily truncated the line instead of bothering me. gah.

So this morning I used perl, which I know is capable of dealing with lines 10 times as long, and went on my merry way. Even so... that's another example of an apparently perfectly reasonable static buffer limit that catches you at inopportune moments. Grawr.

December 2016

S M T W T F S
    123
4 5678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 23rd, 2025 12:31 am
Powered by Dreamwidth Studios