Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> Using AWK,GREP,SED,etc, Reading text from one file and using it to replace text in another
post Jul 29 2013, 07:37 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 29-July 13
Member No.: 18,428


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.

Go to the top of the page
+Quote Post

Posts in this topic
- qbgem   Using AWK,GREP,SED,etc   Jul 29 2013, 07:37 PM

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 16th July 2018 - 09:46 AM