14

Changing text in multiple files, but with different text for each file

view full story
linux-howto

http://www.unix.com – Hello, I have a situation where I want to change a line of text in multiple files, but the problem is that I want to change the text to something unique for each file. For example, let's say I have five files named bob.txt, joe.txt, john.txt, tom.txt, and zach.txt. Each of these files has a line (1st line) with the text "name = xxx". For each file, I want to replace the "xxx" with the name in each file name, such that bob.txt has the first line changed to "name = bob", the first line in joe.txt is changed to "name = joe", etc. I have some experienc (HowTos)