Answer the question
In order to leave comments, you need to log in
Stack output of two files?
There is a 1.txt file with content
123а
456b
789а
012b
912а
468b
Answer the question
In order to leave comments, you need to log in
How to output to 3.txt file with sum content of two files
Depends on the exact task.
if you have a and b are line markers, then in the loop you read the lines of the first file, find the letter, use it to grep the second file, get the two necessary lines. You fold and write in the third.
If it's just lines in order - and they always match in number, then you can simply read two files into separate arrays in a loop and then go through the loop again.
If there are always three digits in each line, you can cut through ${variable:0:3}, if different - you can use a regular expression.
You would show how you tried to do and what exactly you do not work out. And it looks like you want someone to do your homework for you. And with this - freelance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question