I want to concatenate 2 files file1 and file2 into file3 without returning a line:
cat file1 #return AAAAAAA cat file2 #return BBBBBBB
cat file1 file2 > file3
cat file3 #will return AAAAA BBBBB
I want to have AAAAABBBBB
This should work:
printf "%s%s\n" "$(<file1)" "$(<file2)" >file3
Or:
echo "$(<file1)$(<file2)" >file3
Connect it to a command tr that will remove newlines:
tr
cat file1 file2 | tr -d "\n" > file3
What about
$ echo $(cat aaa)$(cat bbb) aaabbb
Pearl for the rescue:
perl -pechomp file1 file2 file3... > file.out
See chomp .