Update a file to put text inline in Bash in Linux

Home > Search
  by

The paste command can be used to update a file to place text in line. For example, let's say file1 contains the following text.

Hello
World
How
are
you
today?

 

The paste command will put the text inline.

~]# cat file1 | paste - -
Hello World How are you today?

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments