How can I copy and paste text lines across different files in a bash script? - Ask Ubuntu


from number of files, need create new file each line of text sequence of respective lines original files. so, let's have 2 files structure this:

file1:

aaaa bbbb cccc 

file2:

xxxx yyyy zzzz 

i need combine them result like:

aaaaxxxx bbbbyyyy cccczzzz 

how can bash script?

use paste command:

paste -d '' file1 file2 

by default, paste joins lines tabs, need use -d option tell use empty string joining.


Comments

Popular posts from this blog

debian - Kali Linux - Debootstrap error Failed to determine codename for the release - Super User

crash - Windows Rundll32 (child process of DllHost) is crashing. How can I even identify it? - Super User

Windows XP installation, no previous version of Windows NT - Super User