$ cat animalscatfishzebramonkey
and we want it to be arranged in one horizontal line, separated by space. We can achieve that by using tr command.
$ cat animals | tr "\n" " "cat fish zebra monkey
What happened is, \n (symbol for newline), will be replaced with " ", which is symbol for space.
No comments:
Post a Comment