i have one column with data smith
john
michale
the o/p should be smith,john,michale how we do in unix
Answer Posted / srinivas
Buddies here is the correct answer assume file.txt is the input file then the command would be
cat file.txt | tr "\n" ","
what above command will do is on the input (which is 3 columns each having "\n" at the end) it will replace set1 ("\n" in this case) with set2 ("," in this case).
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is called in unix?
Can you explain the method of changing file access permission?
How do you go to a directory in unix?
Describe a link in unix.
Is mac a unix system?
Why do we need unix shell scripting?
How do I find the port number of pid in unix?
What is utility unix?
Enlist common shells with their indicators.
What do you understand by the term wild-card interpretation?
What are the layers of unix operating system?
What is a unix file?
What do you understand by unix shell?
Is unix still relevant?
How do I grep multiple patterns in unix?