I have two files that list output in the following format:
line1 line2 line3
20% 30% 40%
How can I achieve this format below (single row)from the 2 original files and have this in a new file all in one step?
line1=20% line2=30% line3=40%
Amending @gniourf_gniourf's suggestion: Given the two files you call:
paste -d= file1 file2| tr '\n' ' '
which first creates
- newline separated pairs from file1 and file2 same line entries
- joined by
- in the pipe tr(anslate) replaces every newline character
\nwith a single space
... if a pipe qualifies as "in one step".