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
Is unix free?
What is inode in unix operating system?
i m putting 2.6yrs fake exp in oracle/unix production support i want to know some real time issues,like tell me the challenging issue u ever faced? my project is credit card application plz help me!
What is architecture of unix operating system?
Where unix is used today?
What is ‘the principle of locality’?
What is unix language?
What scheme does the Kernel in Unix System V follow while choosing a swap device among the multiple swap devices?
What is home directory in unix?
What is a directory?
What is unix kernel?
What is unix shell scripting used for?
Explain how and when a DNS request is solved when a user tries to surf to the site www.abcdeg.in .Assume the user machine uses a local name server and sits on another network other than www.abcdef.in.
What is unix structure?
Is it possible to count number char, line in a file; if so, How?