Insert CRLF's with sed?
Im using DeleGate, the multiprotocol proxy, which supports rudimentary modifications to the traffic stream (similar to using netsed), tru usage of what they call "CFI Script". Now I would like to be able to break up stuff by inserting a lot of CRLF's.
The simplest solution would be to tag a html entity like x (read: ampersand,hashmark,1,2,0,semicolon) on, but ofcourse Wintendo will not allow for lower unicode chars at all, or translate this to "x". FWIW, Ive been able to use Bash (on windoze :-] ) and "tr" to piggyback a \120 or \130 on a stream, so I *know* thats possible, but CFI Script will allow only "sed" usage. Hope the prev. is clear. Q: *how* can I tag on a CRLF with sed? TIA for any pointers! |
ok... i'm not really sure what you're asking here... do you just need help with the sed command? it's going to be something like
sed 's/char/CRLF/g' infile > outfile where char is what you want to replace with the CRLF's. if you want to add CRLF's without getting rid of the chars (or whatever) sed 's/char/charCRLF/g' infile > outfile naturally, of course, the CRLF's will be \n or whatever it is they're supposed to be. CRLF is carriage-return/linefeed... right? |
Thnx, Isajera, What I need is a solution with sed to insert these Carriage return/Line feed control chars (think its unicode, right?) that *stick*. Using "\n" can't work IMO, because "\n" doesnt mean nothing to Wintendo when the stream gets there, and somehow I never could get the backslash escaped, how many escapechars I put in front of it :-]
So it's not the way *how* to insert chars, but *what* chars to insert :-] *Can* sed even insert control chars so a Wintendo box can recognize em??? |
if memory serves correctly, ^M is the windows equiv of \n.
i'd test it out first, tho. |
Thnx again for your ideas Isajera, Ill try that out.
|
^m;)
. . . . . |
dos2unix unix2dos any good ??
|
All times are GMT -5. The time now is 02:19 AM. |