Skip to main content
Tweeted twitter.com/StackUnix/status/899610132040089600
fixed formatting
Source Link
cas
  • 84.4k
  • 9
  • 136
  • 205

I have two text files. The first "file1.txt" has content: Apple Orange Banana

Apple
Orange
Banana

while the second file "file2.txt" has content: monday tuesday wednesday

monday
tuesday
wednesday

I want to combine them into one file and its output is:

Apple File1.txt Orange File1.txt Banana File1.txt monday File2.txt tuesday File2.txt wednesday File2.txt

Apple       File1.txt
Orange      File1.txt
Banana      File1.txt
monday      File2.txt
tuesday     File2.txt
wednesday   File2.txt

I have two text files. The first "file1.txt" has content: Apple Orange Banana

while the second file "file2.txt" has content: monday tuesday wednesday

I want to combine them into one file and its output is:

Apple File1.txt Orange File1.txt Banana File1.txt monday File2.txt tuesday File2.txt wednesday File2.txt

I have two text files. The first "file1.txt" has content:

Apple
Orange
Banana

while the second file "file2.txt" has content:

monday
tuesday
wednesday

I want to combine them into one file and its output is:

Apple       File1.txt
Orange      File1.txt
Banana      File1.txt
monday      File2.txt
tuesday     File2.txt
wednesday   File2.txt
Source Link

merge file text with file name

I have two text files. The first "file1.txt" has content: Apple Orange Banana

while the second file "file2.txt" has content: monday tuesday wednesday

I want to combine them into one file and its output is:

Apple File1.txt Orange File1.txt Banana File1.txt monday File2.txt tuesday File2.txt wednesday File2.txt