IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Should be something along the lines of
NewsedQuestion
First-off,I'vealreadysolvedtheproblemIhad(strippingwhitespaceoutofalargefile)butI'mcuriousaboutsed'sbehaviour.

Ingredients:
WindowsXPPro
GNUsedversion3.02
A21MBtextfilewithwhitespace.

Method:
Asimplesed"s///g"InpFile.txt>OutFile.txt

Result:
Myassumptionwasitwouldgothroughthefilelinebyline,stripoutthewhitespace,
>andwriteittooutput.However,memoryusagesteadilyincreasedto1GB,whereuponXPsaid'
>Nomorememoryforyou!'andtheprocessdiedwith'Can'twritetononexistantpipe'.
VariationsliketypeInpFile.txt|sed"s///g">OutFile.txtdidthesamething.

I'mtoomuchofawusstotrythisonourUnixbox,lestitdoesthesamething,
>causingtheadminstostormoutofasmokingserverroomwieldingasharpenedcluex4.

Question:
Isthisnormal/expectedbehaviourforsed?

Sidenote:
IntheendIusedtr,likeIshouldhavedoneallalong.Tookjustafewseconds.

[edit note: manually break the long lines to make display more palatable]
Expand Edited by ChrisR Sept. 13, 2004, 09:42:36 PM EDT
New Yesveryprettythanksforthat:)
Two out of three people wonder where the other one is.
     sed Question - (Meerkat) - (6)
         Should be something along the lines of - (ChrisR) - (1)
             Yesveryprettythanksforthat:) -NT - (Meerkat)
         Try this - (drewk) - (1)
             Same as when I used 'type' - insane memory usage. Weird. -NT - (Meerkat)
         XP sed broken - (broomberg) - (1)
             That's more like it! Thanks for trying that out. -NT - (Meerkat)

It's always the small minority of people who are total assholes that ruin it for the vast majority of people who are only partial assholes.
36 ms