0

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?

1 Answer 1

2

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

tr '\n' , < input_file > output_file
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.