473,473 Members | 1,520 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 1831
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
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
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
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
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
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
by: icemani | last post by:
Is there any advantages that storing data in hexadecimal octal formate in data base? By Manikandan.
0
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
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
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
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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.