-1

wrong model show

right model show

when typing 'curl' in mac bash,the result is mixed with the next command line. the model which i want is like the second pic.

Léa Gris
  • 17,497
  • 4
  • 32
  • 41

1 Answers1

0

Your document you got from the web does not end cleanly with a newline, so when the program 'curl' exits, your shell wakes up and prints starting where the cursor is, which means it looks like you have a mixed-up output. You don't.

You can do two things on that "curl" line to get the next shell prompt off on its own.

curl http://localhost/hello; echo
Chad Miller
  • 1,435
  • 8
  • 11
  • thx ,it is a way to solve this problem, but everytime typing echo command make me feel not good, i find adding -w "\n" in ./curlrc file is a better way. – Mars Chris Jul 20 '19 at 17:02
  • this is link https://stackoverflow.com/questions/12849584/automatically-add-newline-at-end-of-curl-response-body – Mars Chris Jul 20 '19 at 17:09