Author: David Dahlem
Date: 07:58:51 09/26/05
Go up one level in this thread
On September 26, 2005 at 07:53:30, Igor Gorelikov wrote: >First you need to run sed with the following command (it can be done with a >batch file) to joint each pair of lines and add asterisk for results: > >sed "$!N;s/\n/ /;s/$/\n*\n/" book.txt > temp.pgn > >Then run PGN-extract to obtain a pgn file: > >pgn-extract -obook.pgn temp.pgn > >That's all. Now you get book.pgn. > >Regards, >Igor Hi Igor I created a batch file as you suggest, with this content ... sed "$!N;s/\n/ /;s/$/\n*\n/" book.txt > temp.pgn This 'almost' works. I get two lines combined into one line in temp.pgn ... e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 c1g5 e7e6 f2f4 d8b6 d4b3 b8c6 d1f3 c8d7 e1c1 f8e7 c1b1 b6c7 g5h4 e8c8 h4f2 c8b8 f1d3 d8g8 h1e1 c6b4 f3e3 d7c6 e2e4 e7e5 g1f3 b8c6 f1b5 g8f6 e1g1 f6e4 d2d4 e4d6 b5c6 d7c6 d4e5 d6f5 d1d8 e8d8 b1c3 c8d7 f1d1 d8c8 f3g5 d7e8 b2b3 b7b6 c1b2 f8e7 g5e4 c8b7 d1d3 a8d8 a1d1 d8d3 * e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 c1e3 e7e6 f2f3 b7b5 g2g4 h7h6 d1d2 b8d7 e1c1 c8b7 h2h4 b5b4 c3a4 d8a5 b2b3 d7c5 a2a3 c5a4 a3b4 a5c7 b3a4 d6d5 e2e4 e7e5 g1f3 g8f6 f3e5 d7d6 e5f3 f6e4 d2d4 d6d5 f1d3 f8d6 e1g1 e8g8 c2c4 c7c6 d1c2 b8a6 a2a3 c8g4 f3e5 g4h5 c4d5 c6d5 b1c3 e4c3 b2c3 g8h8 f2f4 d6e5 f4e5 h5g6 * I know nothing about sed commands, what changes do i need to make in my batch file? Regards Dave
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.