Scenario I have a configuration file. Example of config.file: cpu= ram= floppy0= floppy1= floppy2= floppy3= scsi=false I've created a list of the games in another file - gamelist.txt. Example of file contents: exile cannon fodder sensible soccer robocod stunt car racer I want to take each line from the gamelist file and insert it after "floppy0=" in the configuration file then save seperate files for each game with corresponding filename to the game. Example $game.config cpu= ram= floppy0=$game floppy1= floppy2= floppy3= scsi=false Take name from gamelist.txt, insert each game name from the list after floppy0= in the configuration file then save a new, seperate config.file as $game.config Expected output exile.config cpu= ram= floppy0=exile floppy1= floppy2= floppy3= scsi=false