LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 09-15-2009, 09:20 AM   #1
deepakthaman
LQ Newbie
 
Registered: Sep 2009
Posts: 7

Rep: Reputation: 0
Creating String from words in a file


Hi i have a file called search.txt

Which contains text like

Car
Bus
Cat
Dog

Now i have to create a string from the file which should look like

Car,Bus,Cat,Dog

( appending , is essential part) String must be stored in some variable so i can pass it as argument to some other command.

Thnx in advance
 
Old 09-15-2009, 09:24 AM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

http://www.linuxquestions.org/questi...a-file-755350/
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating String from words in a file deepakthaman Linux - Newbie 22 09-16-2009 05:15 PM
C++ "counting words in a string" Rico16135 Programming 11 05-06-2009 12:30 PM
grep, sed, awk or tr - searching words in a string hal8000b Programming 2 03-06-2009 08:04 PM
creating array in c++ with string index mohtasham1983 Programming 3 03-11-2007 04:01 PM
PHP script/function to get 4-5 words around a keyword in a string(like google) rmanocha Programming 8 07-13-2004 06:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration