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 unix language?

849


What is the root directory in unix?

904


What is unix orphan process?

947


How to copy files from one directory to other in unix?

802


What is unix operating system used for?

883


What is page fault? Its types?

867


Describe file systems in unix?

979


Is unix a programming language?

915


What do you mean by the protection fault?

935


What is unix and its features?

959


What is typeset in unix?

931


How unix is used?

832


What is the procedure to configure MC/SG Cluster services in HP-UX 11i v3 OS Environment?

5849


How does unix operating system works?

902


Which file system is used in unix?

926