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 are conditions on which deadlock can occur while swapping the processes?
What is unix operating system and its features?
Is mac unix based?
What are the types of unix?
How do you go to a directory in unix?
What is difference between unix and windows?
Why is it that it is not advisable to use root as the default login?
What are the bits that support the demand paging?
Which is a form of interprocess communication in unix?
What is the difference between soft link and hard link in Unix operating system ?
Suppose I have one column with data smithjohnmichale the o/p should be smith,john, michale how we do in unix?
What is process termination in unix?
Is unix free to use?
Is unix only for supercomputers?
Is the Process before and after the swap are the same? Give reason.