Method 1:-
You can write/append content line by line using the multiple echo commands. This the simple and straight forward solution to do this. We recommend going with Method 2 or Method 3.
Method 2:-
You can append content with the multi-line command in the quoted text. In this way can write multiple lines to fine with single echo command. But the third method is our suggested method to do this.
Method 3:-
This is the third and suggested option to use here documents («) to write a block of multiple lines text in a single command. The above methods are also useful but personally, I also use this while working.