Printable Version of Topic

Click here to view this topic in its original format

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


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 directory
the value I need lies somewhere in the file
The previous line is where I need to replace the 1 with the first value in the data file
the 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 file
which 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

Thanks for any help you can provide.

Powered by Invision Power Board (
© Invision Power Services (