Author: Steve Coladonato
Date: 12:25:33 08/23/99
Go up one level in this thread
Pete, I saw a sample of the ascii text in another post. If you have the "!" as a comment to a move, it could appear after black's move and therefore my previous solution will not work. However, since the line you are looking for is at the end of the game and all by itself the following should work: grep -c ^!$ <filename> The "^" represents the beginning of a line and the "$" represents the end of a line. So grep -c ^ <filename> or grep -c $ <filename> will return the number of lines in a file. grep -c ^!$ will return the count of lines where the ! is preceded by the beginning of the line and followed by the end of line. Steve
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.