mindia
mindia

Reputation: 7729

Sed command in bash script

I work with bash script . I have simple text

22
80
880

and I want to get this "22,80,880" using .Can enybody help me?

Upvotes: 0

Views: 49

Answers (1)

ruakh
ruakh

Reputation: 183301

The simplest approach is to use the tr ("translate characters") utility, telling it to translate newlines to commas:

tr '\n' , < input_file > output_file

Upvotes: 2

Related Questions