i have one column with data smith
john
michale
the o/p should be smith,john,michale how we do in unix

Answer Posted / david

file1 contain the data like ....
john smith michael


so
cat file1 |tr ' ' ','
or
cat file1 |sed 's/ /,/g'



this will really help you dear ....

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is $# in unix?

499


How to check the date in unix?

548


How do you change directories in unix?

518


What is disk block allocation in unix?

499


What is grep|sort give example?

523






Which is the shell of unix?

527


Is unix more secure than windows?

461


If we are terminated at the middle of the program execution in UNIX,what will happen to the program, it will continue running r terminate r the o/p will be send to your mail?

985


I have one flat file,in this file how many columns are there i don't know,but one ename column is there , just i want to cut the surname, so how to cut the surname, any one know the answer please guide me ? ename ----- tapan kumar nayak bala murugan kutal chkrobarthy biswo My output is like that OUTPUT ------ nayak murugan chakrobarthy biswo

2967


Write a script that prints out date information in this order: time, the day of week, day number, month, year(sample output: 17:34:51 pdt sun 12 feb 2012)

775


What is the command to connect to remote terminals

530


How to remove files in unix?

572


Difference between the fork() and vfork() system call?

595


How does the kernel differentiate device files and ordinary files?

562


How to create a blank file in unix?

515