2

I need to insert a space line in a hp-ux script, that will generate a text output. in that text file i will append 2 other text files and would like to have spaces between the input.

I have the test, test1 and test2 and use cat to append the content of test1 and test2 to test.

Could you please tell me what could help me? i tried echo, but i had no luck.

cat /home/cmorban/test1.txt >> /home/cmorban/test.txt
cat /home/cmorban/test2.txt >> /home/cmorban/test.txt 

Thanks!

Neil Forrester
  • 5,101
  • 29
  • 32
Ciprian
  • 97
  • 1
  • 1
  • 10

1 Answers1

0

This can be done through "echo" in between file write commands. So the code will be like follows.

cat /home/cmorban/test1.txt >> /home/cmorban/test.txt
echo "" >> /home/cmorban/test.txt
cat /home/cmorban/test2.txt >> /home/cmorban/test.txt 
sugunan
  • 4,408
  • 6
  • 41
  • 66