Paste command formatting

view story

http://www.unix.com – Hi, I was trying to concatenate some files using paste command along with some formatting but getting stuck. The problem is: Code: cat 1.txt A Code: cat 2.txt B C Code: cat3.txt D E Code: cat 4.txt G H I Code: paste -d "%" 2.txt 3.txt > 5.txt B%D C%E Code: paste -d "%" 1.txt 5.txt 4.txt A%B%D%G %C%E%H %%I but Expected Output Code: A%B%D%G %C%E%H %%%I problem is the number of lines present in the file. with absence of number of fields, the percentage sign during concatenation should vary accordingly. This is just a scenar (HowTos)