In bash script how to merge 2 Multi lines files in one file
I have a file 1 :
ZRFYOK5U
H8X7IS5G
8TV7N4BK
And a file 2 :
1
4138
1167
I'd like to merge them so it looks like this :
ZRFYOK5U;1
H8X7IS5G;4138
8TV7N4BK;1167
Solution 1:
As mentioned in the comments under the question, paste is pretty straightforward to solve this problem:
paste -d ';' file1 file2
Example:
$ paste -d ';' <(seq 5 ) <(seq 6 10)
1;6
2;7
3;8
4;9
5;10