How would you output hello without a newline Linux?

How would you output hello without a newline Linux?
Answer
Just for the most popular linux Ubuntu & it’s bash :
  1. Check which shell are you using? Mostly below works, else see this: echo $0.
  2. If above prints bash , then below will work: printf “hello with no new line printed at end” OR. echo -n “hello with no new line printed at end”
 

Tìm kiếm

Back
Top