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

What is called in unix?

890


Can you explain the method of changing file access permission?

901


How do you go to a directory in unix?

866


Describe a link in unix.

1512


Is mac a unix system?

854


Why do we need unix shell scripting?

953


How do I find the port number of pid in unix?

896


What is utility unix?

943


Enlist common shells with their indicators.

1020


What do you understand by the term wild-card interpretation?

887


What are the layers of unix operating system?

932


What is a unix file?

947


What do you understand by unix shell?

993


Is unix still relevant?

952


How do I grep multiple patterns in unix?

1002