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
Does unix have a gui?
How to null a file in unix?
In what way the Fault Handlers and the Interrupt handlers are different?
Who developed unix operating system?
What are the features and benefits of unix?
What are the entities that are swapped out of the main memory while swapping the process out of the main memory?
Is a directory unix?
What is meant by u-area?
Explain system bootup in unix.
Is unix still relevant?
What is difference between unix and windows operating system?
What is ps1 and ps2 in unix?
What are positional parameters in unix?
Explain some of the fundamental concepts of unix?
What is a shell?