Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Does unix have a gui?

851


How to null a file in unix?

1092


In what way the Fault Handlers and the Interrupt handlers are different?

917


Who developed unix operating system?

870


What are the features and benefits of unix?

881


What are the entities that are swapped out of the main memory while swapping the process out of the main memory?

960


Is a directory unix?

823


What is meant by u-area?

822


Explain system bootup in unix.

905


Is unix still relevant?

922


What is difference between unix and windows operating system?

952


What is ps1 and ps2 in unix?

921


What are positional parameters in unix?

952


Explain some of the fundamental concepts of unix?

807


What is a shell?

884