Re: Limit on "fmt" buffer size? Loose much of long line.
From: rc (rc_at_networkz.ch)
Date: 09/15/04
- Next message: Fred Ma: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Previous message: Paul Pluzhnikov: "Re: using ptrace system call"
- In reply to: Fred Ma: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Next in thread: Fred Ma: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Reply: Fred Ma: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 15 Sep 2004 08:23:56 -0700
> Hi, Christian,
>
> I tried it on the following 21-line file, then piped it through less.
> It didn't seem to truncate the long lines e.g. line#15, and it seemed
> to put in some empty lines too. Thanks for giving it a crack anyway.
>
> Fred
>
> P.S. Line#15 is the long line, so it will probably get truncated in
> this posting.
> ------------------------------------------------------------
> 1 MaxWireLen=8
> 2 fnStop=MatlabStop
> 3 MinBarsTooLong=10
> 4 LimlessStart=1000
> 5 Initial RndGenr.xseed= 8 40914 54979
> 6 DiversityAllPairsEuclidean=0.05559
> 7 DiversityCircDiffSimple0.00166189
> 8 DiversityCircDiffGoodNorm0.00164503
> 9 DiversityCircDiffLinterp0.00494928
> 10 GenerationNum:MinViolations
> 11 -----------------------------------
> 12 50:6
> 13 client.mexsol detected stop flag file MatlabStop, iGen=50
> 14 [C]ontinue [S]top [K]board: c
> 15 100:3 150:2 200:2 250:2 300:1 350:1 400:1 450:1
500:1 550:1 600:1 650:1 700:1 750:1 800:1 850:1 900:1 950:1
1000:1 1050:1 1100:1 1150:1 1200:1 1250:1 1300:1 1350:1 1400:1
1450:1 1500:1 1550:1 1600:1 1650:1 1700:1 1750:1 1800:1
1850:1 1900:1 1950:1 2000:1 2050:1 2100:1 2150:1 2200:1 2250:1
2300:1 2350:1 2400:1 2450:1 2500:1 2550:1 2600:1 2650:1
2700:1 2750:1 2800:1 2850:1 2900:1 2950:1 3000:1 3050:1 3100:1
3150:1 3200:1 3250:1 3300:1 3350:1 3400:1 3450:1 3500:1
3550:1 3600:1 3650:1 3700:1 3750:1 3800:1 3850:1 3900:1 3950:1
4000:1 4050:1 4100:1 4150:1 4200:1 4250:1 4300:1 4350:1
4400:1 4450:1 4500:1 4550:1 4600:1 4650:1 4700:1 4750:1
> 16 client.mexsol detected stop flag file MatlabStop, iGen=4750
> 17 [C]ontinue [S]top [K]board: s
> 18
> 19 Elapsed time in evolution loop: 168.641 seconds.
> 20 iGen=4750
> 21 ifFail=1
Hmm, i've forgot about the double spaces. In the example i've sent
you, i've put $/=" ", which means that the input record separator is
one space. Unfortunately, you cant use a regex for this, so you cant
say $/=" +" to split on one or more spaces. As "perldoc perlvar"
states:
Remember: the value of "$/" is a string, not a
regex. awk has to be better for something. :-)
So, you can change it to " ", but the it won't wrap the other lines,
but maybe that's not a problem for you.
Regards
Christian
- Next message: Fred Ma: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Previous message: Paul Pluzhnikov: "Re: using ptrace system call"
- In reply to: Fred Ma: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Next in thread: Fred Ma: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Reply: Fred Ma: "Re: Limit on "fmt" buffer size? Loose much of long line."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|