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 the difference between an absolute path and a relative path in unix?
Explain the term filter.
What is delayed write in unix?
Describe the responsibilities of shell in brief.
Does windows use unix?
What is inode in unix operating system?
What is a shell?
What does shebang mean in unix?
How to get the nth word of a line in Unix?
What is the core of unix operating system?
What is the symbol in unix?
Explain a path in unix.
What are the main features of unix?
What is the use of grep and egrep in unix?
What are conditions for a machine to support Demand Paging?