tags:

views:

22

answers:

1

file format change : top to bottom <> left to right

input file format:

100
150
200
300
500

output file format should be:

100,150,200,300,500

I need to apply this in reverse, too.

+3  A: 

Just replace the linefeeds by comma:

$ tr '\n' ',' < input.txt > output.txt

and reverse

$ tr ',' '\n' < input.txt > output.txt
Arne Burmeister
Yours is much cleaner. Good idea.
Alberto Zaccagni