I have written shell script to merge different file's contents I have created directories f1,f2,d1,d2 and files under them , I need to merge all files's contents : comand is
find /home/ah5024331/f1 /home/ah5024331/f2 /home/ah5024331/d1 /home/ah5024331/d2 /home/ah5024331/f1 /home/ah5024331/f2 /home/ah5024331/d2 -type f -exec cat {} \; -exec echo \; > /home/ah5024331/op.txt
The output is :
--this is new text from f1 ----
--this is text from f2 ----
--this is new text from d1 ---
---this is new text from d2 ---
--this is new text from f1 ----
--this is text from f2 ----
---this is new text from d2 ---
after file f1 contents,it adds one empty line. I want merged contents without any empty line in between . What are the changes I need to do in above command? Any help would be appreciated in advance.