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 unix language?
What is the root directory in unix?
What is unix orphan process?
How to copy files from one directory to other in unix?
What is unix operating system used for?
What is page fault? Its types?
Describe file systems in unix?
Is unix a programming language?
What do you mean by the protection fault?
What is unix and its features?
What is typeset in unix?
How unix is used?
What is the procedure to configure MC/SG Cluster services in HP-UX 11i v3 OS Environment?
How does unix operating system works?
Which file system is used in unix?