- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: converting ascii to csv
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2004 11:08 AM
тАО11-30-2004 11:08 AM
I need to convert an ascii file to csv file. I have used the below command with no luck:
uuencode file.ascii file.csv |mail etc etc
however the file is too large to be mailed.
can this be done using dd if not then what command would be best?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2004 11:35 AM
тАО11-30-2004 11:35 AM
SolutionIt is still ascii. Is just means turning for example
------ ascii input ---
aap noot mies
teun piet
------ csv output ----
aap,noot,mies
teun,piet
-----------------------
It gets tricky when quoting and embedded spaces are involved.
A simple conversion with perl can be:
perl -pe '$_=join(",",split)."\n"' file
with awk and assuming 4 columns:
awk 'BEGIN {OFS=","}{print $1,$2,$3,$4}' file
What problem are you exactly trying to solve? What is, where is the input? How much is there roughly: KB? MB? GB? What should the output look like, where should it go? Mind you, we can probably NOT solve your mail problems
Regards,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2004 11:39 AM
тАО11-30-2004 11:39 AM
Re: converting ascii to csv
uuencode file.dat file.csv |mailx -m -N -s ^DQUOTE^BT Rejected File ^DQUOTE^ mail@xexche01.mail.com
this is a job that is automated and to run against a file on a unix box then send a mail to user's in our business.
as explained it failed due to size as stated in the logs so we need to ftp the file instead but as csv.
Thanks
Lawz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2004 01:29 PM
тАО11-30-2004 01:29 PM
Re: converting ascii to csv
ftp is a good choice, but like email, EVERYTHING in the message may be seen by snoopers. You should consider sftp (Secure Shell FTP) to secure the data.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2004 02:29 PM
тАО11-30-2004 02:29 PM
Re: converting ascii to csv
I found that when the extention .dat was changed to csv and then opened by excel, the fields were populated as expected