Is there a way to read a .PGN file using Stockfish engine? If there is can you please give a sample commmand? THanks
The answer is NO. The stockfish engine does not have a concept of a chessboard state. Each position should be completely described through FEN notation. If you want to make a move, you then again describe the complete position and append your moves all in one command string then press ENTER on the keyboard. The engine does not remember the current position for you.
No. Stockfish is an engine not GUI, it doesn't know or understand PGN. The bigger problem is why would you do that? Why would you want to use an engine on a PGN game? This is like giving a calculator you maths exam and hope it'll give out answers magically. Please rethink why you would want to do this.