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
How would you identify daemons in unix?
Does windows 10 have unix?
How to change the password in unix operating system?
What does cd mean in unix?
What is meant by the term nohup?
What does ls mean in unix?
What is the symbol in unix?
What are the links and symbolic links in a unix file system?
What is directory unix?
What is buffer header unix?
What are the advantages and disadvantages of unix operating system?
Is unix os free?
What is $# in unix?
What is a shell?
Which language unix is written?