Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

how do you get rid of the carriage return as last char that way?


Use Ctrl-d to end input without hitting return and you shouldn't get a newline.


bash, at least, only handles Ctrl-d on its own line.


If you're not on a new line, you can type Ctrl-d twice.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: