Overwrite the Value in Text
File
I have a text file call counter.txt. It has only one
line with the number 567.
Here is one way of doing it. No error
How to read in an External Text File? I have tried diff, and it does not give me what I need. I am unsure of the code needed to read in one line at a time of an external file and then use fields from that line to assign to variables. Those variables wold then be passed into an awk with the other file to be compared. If you already know awk, then the most of the issue is solved. Just use awk to read in a line at a time and to assign the designate values to their respective variables. Yes, instead of processing one line at a time and calling
awk repeatedly, awk can read both of your files and do the diff logic.
I could provide a solution if you provide more detail (sample from both
files, how you want them matched, estimated file sizes).
#!/bin/sh
Have a Unix Problem
Books About Unix
Unix Home: Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|