Conversion of spaces Text file into CSV format file
Input file (each line is separaed by spaces )given below:
NOte: Output file shoud be CSV format and an error check for the number of "commas" in each line of the created csv output file. There should be 5 commas in every line of the csv file. If there are less or more that this then the script should log an error and preferably rename the created file to .err (for example). command is below . Can somebody help me in commas condition.
Moderator's Comments:
Please use code tags when posting data and code samples!
Last edited by vgersh99; 04-29-2011 at 12:39 PM..
Reason: code tags, please!
Hi Folks,
I've to convert manually couple of *.xls files to *.csv files everyday :(
so i was just wondering if anyone could just help me with a shell script or awk script to automate the process :)
PS : Problem is that i cannot use any third party software for the conversion.
Thanking... (1 Reply)
Hi Guy's can someone help me in converting the following
I have a flat text file which has several thousand lines which I need to convert to a csv it's got a consistent format but basically want every time it hit's txt to create a new line with the subsequent lines comma delimited for example
... (6 Replies)
Open to a sed/awk/or perl alternative so that i can stick command into my bash script.
This is a problem I resolve using a combination of cut commands - but that is getting convoluted. So would really appreciate it if someone could provide a better solution which basically replaces all... (3 Replies)
hi...... thanks for allowing me to start a discussion
i am collecting usb usage details of all users and convert it into csv files so that i can export it into some database..
the input text file is as follows:-
USB History Dump
by nabiy (c)2008
(1) --- Kingston DataTraveler 130 USB... (2 Replies)
Request if some one could provide me shell script that converts the below "input file" to "CSV format file" given
Name Domain Contact Phone Email Location
----------------------- ------------------------------------------------ ------- ----- ---------------------------------... (7 Replies)
INput file attached in thread : Column widths at 24,73,82,87,121 characters (sed 's/./,/24;s/./,/73;s/./,/81;s/./,/87;s/./,/121;s/ *, */,/g' fixedinputfile >output.csv
). The client wants instead of hard coding the column widths as they are not fixed .he has given the hint stating that ( ... (3 Replies)
Hi Unix Gurus,
I tried to convert the attached xhtml table content into csv file using unix shell script (lynx -dump filename) and got the below results:
Title ID Owner Priority Estimate Project Change Date Changed By
Complexity Create Date Created By Detail Estimate Total De tail... (6 Replies)
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Hi ,
I need a help in following scenario.I tried searching in google but couldn't able to find the exact answer. Sorry if i am re-posting already answered query.
While i am trying to convert into log file into csv i couldn't able to get the format which i am looking for.
I converted file... (4 Replies)
Hello,
I have a binary csv file that was created on 'Red Hat Enterprise Linux Server release 6.6'. Now we have transferred all files on Ubuntu 16.04.2 LTS/xenial
On opening the file in Ubuntu, there are special characters
... (8 Replies)