I'm trying to use sed in windows, but can't find any documentation.
@MSGID: 1:340/1101 01083441
@PID: THE READER V4.50 [freeware]
@NOTE: IceEdit 2.35 K96741
@TID: FastEcho 1.46.1 43288
I'm trying to use sed in windows, but can't find any documentation.
It works totally different than *IX sed and isn't enclosed in ', uses
^ as an escape character, I can't figure out how to add ascii
characters, etc. My batch file looks like:
for %%a in (*.QQ) do (
sed -b -i s/TID:^ FastEcho^ 1.46.1^ 43288/TID:^ FastEcho^ 1.46.1^ 43288\x0D\x01TZUTC:^ \x2D0700/gi %%a
)
At the end of the first line of sed is a space and the line continues. There are no instructions for handling special characters in windows
that I can find. I'm using \x0D for carriage return, \x01 for the
kludge character and \x2D for '-', since it didn't like that in the command. I can get simple expressions working, and ones with spaces,
but nothing with ctrl characters or special characters. I know this
isn't the proper area, but the solution I'm looking for is because
Wilfred keeps saying I don't have a TZUTC kludge in my messages and
I'd like to be compliant.
---
Shurato, Sysop Shurato's Heavenly Sphere (ssh, telnet, pop3, ftp,nntp) (ports 22, 23, 110, 21, 119) (ssh: login bbs password shsbbs)
*** THE READER V4.50 [freeware]
SEEN-BY: 1/123 15/0 19/10 90/1 104/115 105/81 106/201 114/706 709 710
711
SEEN-BY: 114/712 713 116/16 123/131 128/73 187 206 253 255 256 258 260
261
SEEN-BY: 128/262 134/0 101 138/146 153/7715 203/0 218/700 221/1 6 360 226/30
SEEN-BY: 226/50 227/114 229/110 112 113 200 206 275 307 317 400 426
428 452
SEEN-BY: 229/470 550 664 700 240/1120 261/38 266/512 275/100 1000
280/464
SEEN-BY: 280/5003 5555 282/1038 291/111 292/854 300/6 301/1 320/119
219
SEEN-BY: 322/757 335/364 340/0 100 101 400 800 1100 1101 341/66 234
342/11
SEEN-BY: 342/200 396/45 423/81 460/58 463/68 467/888 633/280 712/848
1321
SEEN-BY: 3634/12 5000/111 5001/100 5005/49 5019/40 5020/715 846 848
1042
SEEN-BY: 5020/4441 12000 5030/49 1081 5054/8 5058/104 5060/90 900
5061/133
SEEN-BY: 5075/35 128 5080/102 5083/444 5090/958
@PATH: 340/1101 400 15/0 229/426 153/7715 134/101 221/1 6 5020/1042
4441
@PATH: 5060/900 90
I'm trying to use sed in windows, but can't find any documentation.
It works
totally different than *IX sed and isn't enclosed in ', uses ^ as an
escape
character, I can't figure out how to add ascii characters, etc. My
batch
file looks like:
for %%a in (*.QQ) do (
sed -b -i s/TID:^ FastEcho^ 1.46.1^ 43288/TID:^ FastEcho^ 1.46.1^ 43288\x0D\x01TZUTC:^ \x2D0700/gi %%a
)
cygwin\bin\sed.exe --version
Hi Martin.
14 Dec 23 22:08:00, you wrote to All:
for %%a in (*.QQ) do (
That should be (*.QQQ)
sed -b -i s/TID:^ FastEcho^ 1.46.1^ 43288/TID:^ FastEcho^ 1.46.1^ 43288\x0D\x01TZUTC:^ \x2D0700/gi %%a )
My example from OS/2 works fine in this hpt/windows point of mine.
=== Cut ===
set FINDTHIS=\x01CHRS: set ADDTHIS=\x01HELLO: WORLD!\x0D
for %a in (c:\bbs\husky\temp\out\*.pkt) ( sed -b -i -- 's/%FINDTHIS%/%ADDTHIS%%FINDTHIS%/gi' %a )
=== Cut ===
cygwin\bin\sed.exe --version
cygwin/bin/sed (GNU sed) 4.9 Packaged by Cygwin (4.9-1)
I don't know what kind of SED you have in your windows but consider installing cygwin. ;)
@MSGID: 1:340/1101 01093bcb^^^^^^
@REPLY: 2:221/1.1 657c5e7e
@PID: EleBBS/W32 v20130208.d
@TZUTC: -00700
@CHRS: CP437
@NOTE: IceEdit 2.35 K96741
@TID: FastEcho 1.46.1 43288
15 Dec 2023 17:26, you wrote to Tommi Koivula:
@MSGID: 1:340/1101 01093bcb^^^^^^
@REPLY: 2:221/1.1 657c5e7e
@PID: EleBBS/W32 v20130208.d
@TZUTC: -00700
@CHRS: CP437
@NOTE: IceEdit 2.35 K96741
@TID: FastEcho 1.46.1 43288
This one arrived with the TZUTC kludge, but with an incorrect value.
@MSGID: 1:340/1101 012f1e37[...]
@REPLY: 2:341/234.1 65853028
@PID: THE READER V4.50 [freeware]
@NOTE: IceEdit 2.35 K96741
@TID: FastEcho 1.46.1 43288
This one arrived with the TZUTC kludge, but with an incorrect
value.
Weird, it shouldn't be up there... It should be below the @TID: FastEcho... Let me know if it still looks like that.
Sysop: | altere |
---|---|
Location: | Houston, TX |
Users: | 68 |
Nodes: | 4 (0 / 4) |
Uptime: | 02:41:11 |
Calls: | 893 |
Files: | 7,883 |
Messages: | 294,742 |