I have many text files in a directory. I want to append/add * at the end of last line (content) of each and every text file of the directory with the extension .txt
How can this be achieved in Ubuntu 20.10 in single operation?
Why I am asking this is because currently I am working on .txt and .pgn files.
If I have to convert .txt to .pgn file then an *, 1/2-1/2, 1-0 or 0-1 is needed at the end of the last line, (signifying score or end of game to the machine) otherwise I will not be able to convert them to .pgn files. Also even if I convert them to .pgn files by save as, then also the file would still be incomplete and unreadable in machine binary that will be made out of it. Machine will not be able to identify it as a score or end.