If the HTTP response body for a curl request doesn\'t contain a trailing newline, I end up with this really annoying condition where the shell prompt is in the middle of the
Use this:
curl jsonip.com; echo
If you need grouping to feed a pipe :
{ curl jsonip.com; echo; } | tee new_file_with_newline
OUTPUT
{"ip":"x.x.x.x","about":"/about"}
This is that simple ;)
(and not limited to curl command but all commands that not finish with a newline)