Printable Version of Topic

Linuxhelp _ Programming in Linux _ Using AWK,GREP,SED,etc

Posted by: qbgem Jul 29 2013, 07:37 PM

I trying to take values from a file and use those values to replace a value in other files.

Data file looks something like this

1234.53.1

The number of files I need to replace a value in is the same as the length of the data file

This is an example 1st file in the directorythe value I need lies somewhere in the fileWGT=1The previous line is where I need to replace the 1 with the first value in the data filethe only way I can see this working is to read in the files in the same order as the the values appear in the data filewhich is easy to do but I can't seem to find a way to pipe the 1st line of the data file into a gsub type function