I need to do this:
$ echo ' File Contents ' > my-file
The problem is that the resulting file contains a newline at the beginning and at the end.
I tried this but didn't work:
$ echo '\ File Contents\ ' > my-file
What can I do?
Maybe you can use a HERE document?
I would use
Paste what you want to go into
Another simple answer not mentioned is: