Copy text file1-search file2-replace search with copied
Posted: 30 Aug 2012 15:47
Hello, I can't seem to figure out how to add a new post. I would like to ask the forum for help with a batch script I'm working on.
I basically have two text files, (find.txt) and (replace.txt). I have a script that performs an action that outputs a computer's serial number, or specifically a Dell Service Tag, and places that serial number in (find.txt). (replace.txt) has about 40 lines of data, and on line 35 it says NODENAME=<IGNORE>. What I want to do is to copy the Service Tag from (find.txt) and then search for "<IGNORE>" in (replace.txt) and replace "<IGNORE>" with the service tag. The (find.txt) file only has one line of data, and it is the service tag. I hope I explained correctly. Let me know how I can post this or if there is any help I can get. Thank you.
I basically have two text files, (find.txt) and (replace.txt). I have a script that performs an action that outputs a computer's serial number, or specifically a Dell Service Tag, and places that serial number in (find.txt). (replace.txt) has about 40 lines of data, and on line 35 it says NODENAME=<IGNORE>. What I want to do is to copy the Service Tag from (find.txt) and then search for "<IGNORE>" in (replace.txt) and replace "<IGNORE>" with the service tag. The (find.txt) file only has one line of data, and it is the service tag. I hope I explained correctly. Let me know how I can post this or if there is any help I can get. Thank you.