473,480 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CSV formate file

123 New Member
Hi .
I dont know in which thread my question should be appropriate , so sorry for that.
I have one data base table , and i am importing all the results of one "email " field into result.txt ,which is in my home directory in unix server..

Now i want that file to be comma seperated,
means all the email should be

like

abc@yahoo.com
bbb@gmail.com
ddd@hotmail.com

something like this..Can u please help me ??

+---------------+
| email |
+---------------+
| |
| |
| |
| |
| abc@yahoo.com |
| email |
+---------------+
May 9 '08 #1
3 1832
gpraghuram
1,275 Recognized Expert Top Contributor
Hi .
I dont know in which thread my question should be appropriate , so sorry for that.
I have one data base table , and i am importing all the results of one "email " field into result.txt ,which is in my home directory in unix server..

Now i want that file to be comma seperated,
means all the email should be

like

abc@yahoo.com
bbb@gmail.com
ddd@hotmail.com

something like this..Can u please help me ??

+---------------+
| email |
+---------------+
| |
| |
| |
| |
| abc@yahoo.com |
| email |
+---------------+

You want the sql statement output should be formatted like the above or you want to format the contents in a file like the above?

Raghu
May 11 '08 #2
ajd335
123 New Member
You want the sql statement output should be formatted like the above or you want to format the contents in a file like the above?

Raghu
Hi Raghu,
The above output is (result.txt) what I am getting after all the manipulation.
Now i am creating one more file i.e final.txt in which i just want

abc@gmail.com
ddd@yahoo.com


something like that
May 12 '08 #3
gpraghuram
1,275 Recognized Expert Top Contributor
Hi Raghu,
The above output is (result.txt) what I am getting after all the manipulation.
Now i am creating one more file i.e final.txt in which i just want

abc@gmail.com
ddd@yahoo.com


something like that
What i understood is you want to convert a newline separated email id's to a comma separated email id's.
If yes the you can do it as

Expand|Select|Wrap|Line Numbers
  1. cat "ip.txt" | tr '\n' ',' > op.txt
  2.  
Raghuram
May 13 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3908
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give...
4
350
by: Robert Scarborough | last post by:
I have a Table in a Typed Dataset which contains a Date field called EventDate. I've ensured that the field is defined as Date as opposed to DateTime in the Typed Dataset. When I generate an...
1
1231
by: Gary Wessle | last post by:
Hi import string import re accumulator = pattern = '(\S*)\s*(\S*)\s*(\S*)' for each text file in dir openfile and read into text
3
1984
by: raahat | last post by:
hi, i need to do desperately the way of storing american DATE formate( like 27-02-2007) in mysql table.i searched on the web a lot,but didnt find anything.PLZ i need someone's help.
6
2390
by: Steve Ryan | last post by:
can anyone send me to some good examples of edit in place for data frid columns i see dot net let me assign a control in the IDE any good sources of reading on editing columns with controls...
1
3990
by: icemani | last post by:
Is there any advantages that storing data in hexadecimal octal formate in data base? By Manikandan.
0
826
by: dinesh4u | last post by:
i have got a data in notepad in formate like 1AAMA04BC 2008 REAL ESTATE REPORT PAGE: 1 02/19/08 0412 ...
2
1426
by: phpfreak2007 | last post by:
Hi everyone... I want to copy text from clipboard and paste into my project.I am able to do it but problem is Its not in same formate..That means I want bold letter as bold and with same...
2
2067
by: kkshansid | last post by:
i want to know how to change date formate in visual basic project from control panel???? from mm/dd/yyyy to dd/mm/yyyy in vb calender control
0
7032
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7076
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4767
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.