awk question
Hello I am trying to use awk to do this.
I have two files lets say file1.txt and file2.txt. file1.txt has 1 column. And file2.txt has 3 columns. I want to insert the column from file1.txt into file2.txt as the new column 3 or for that matter any column. But lets stick to the first case, So then I would have a 4 column file2.txt that would look like file2colum1 file2colum1 file1colum1 file2colum3. How do I do this, is there a command for that? I dont want any matching etc like the join command uses. I just want to insert the column. -denalitastic |
Hi,
Using awk: Code:
#!/bin/bash cat f1.txt F1column1 F1column1 F1column1 F1column1 F1column1 cat f2.txt f2column1 f2column2 f2column3 f2column1 f2column2 f2column3 f2column1 f2column2 f2column3 f2column1 f2column2 f2column3 f2column1 f2column2 f2column3 Output above script: f2column1 f2column2 F1column1 f2column3 f2column1 f2column2 F1column1 f2column3 f2column1 f2column2 F1column1 f2column3 f2column1 f2column2 F1column1 f2column3 f2column1 f2column2 F1column1 f2column3 Hope this helps. |
All times are GMT -5. The time now is 03:27 PM. |