I have a csv file with lines like the followings
123456,"ABC CO., LTD","XXX"
789012,"DEF LIMITED", "XXX"
before I bcp this file to database, the comma in "CO.," need to be removed first.
My script is cat <filename> | sed 's/"CO.,"/"CO."/g'
but it doesn't work. Can anyone here able to... (2 Replies)
Hi friends...
I have a dat file like below:-
test_file.dat
abc,ttt,"""123,89.98",yyu,opp
vvv,"23,76.68",w564,"54,98.87",985
i need the remove the comma present inside the double qoute as output:-
out_test_file.dat
abc,ttt,"""12389.98",yyu,opp
vvv,"2376.68",w564,"5498.87",985... (6 Replies)
Hi,
I am newbie in unix.
Could someone tell me how do I redirect my grep output to a csv/excel ?
I have used below command but the outputs are appearing in one column Not in different column.
grep -e cmd -e cmd1 test.txt | cut -f 5 | sort | uniq -c> op.csv
I do not understand how do I... (14 Replies)
I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields.
Sample lines from the .csv file:
Device Name,Personnel,Date,Solution... (1 Reply)
Hi... I can't find my little red AWK book and it's been a long while since I've awk'd. But I need to take a CSV file and convert the first word of the fifth field to its own field by replacing a space with a comma.
This is for importing a spreadsheet of issues into JIRA...
Example:
a line... (9 Replies)
Hi,
I have a list of tables in a file.txt
C_CLAIM
C_HLD
C_PROVIDER
I want the output to be
'C_CLAIM','C_HLD','C_PROVIDER'
Currently I'm usin awk and getting output which is almost correct but still has minor defects
awk -vORS="','" '{ print $1 }' file.txt
The output of... (4 Replies)
Hello,
I have a text file as:-ABC
BCD
CDF
DEF
EFGI need to convert as 'ABC', 'BCD', 'CDF', 'DEF', 'EFG' using a unix command
anybody can help me out on this.
Regards,
Jas
Please wrap all code, files, input & output/errors in CODE tags.
It makes them easier to read and preserves... (12 Replies)
Hi,
I have a data file separated by comma, data enclosed by ""
head file.txt
"HD","Sep 13 2016 1:05AM","0001"
"DT","273093045","192534"
"DT","273097637","192534"
..
I want to get the 3rd column value (0001) to be assigned to my variable
I tried
FILE_VER=`cat file.txt | awk... (2 Replies)
Hi Experts,
Please support
I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6.
... (3 Replies)
can anyone help me!!!! How to I parse the CSV file
file name : abc.csv (csv file) The above file containing data like
abv,sfs,,hju,',',jkk wff,fst,,rgr,',',rgr ere,edf,erg,',',rgr,rgr I have a requirement like i have to extract different field and assign them into different... (4 Replies)
Discussion started by: J.Jena
4 Replies
LEARN ABOUT DEBIAN
xls2csv
xls2csv(1) General Commands Manual xls2csv(1)NAME
xls2csv - reads MS-Excel file and puts its content as comma-separated data on standard output
SYNOPSIS
xls2csv [-xlV] [-f format ] [-b string ] [-s charset ] [-d charset ] [-q number ] [-c char] files
DESCRIPTION
xls2csv reads MS-Excel spreadsheet and dumps its content as comma-separated values to stdout. Numbers are printed without delimiters,
strings are enclosed in the double quotes. Double-quotes inside string are doubled.
OPTIONS -x print unknown Unicode chars as xNNNN, rather than as question marks
-l list known charsets and exit successfully
-cchar cell separator char. By default - comma.
-bstring
sheet break string. This string (by default - formfeed) would be output at the end of each workbook page. This string is printed
after page starting at start of line, but no linefeed would be automatically added at the end of string. Include newline at the ent
of sheet separator if you want it to appear on separate line by itself
-gnumber number of decimal digits in the numbers. By default maximal double precision (system-dependent macro DBL_DIG) is used.
-qnumber
set quote mode. In quote mode 0 cell contents is never quoted. In quote mode 1 only strings which contain spaces, double quotes or
commas are quoted. In quote mode 2 (default) all cells with type string are quoted. In quote mode 3 all cells are quoted.
-dcharset`
- specifies destination charset name. Charset file has format described in CHARACTER SETS section of catdoc(1) manual page. By
default, current locale charset would be used if langinfo support was enabled at the compile time.
-scharset
- specifies source charset. Typically, Excel files have CODE PAGE record, which denotes input charset, but for some reason you may
wish to override it.
-fformat
- specifies date/time format to use for output of all Excel date and time values. If this option is not specified, format, speci-
fied in the spreadsheet is used. On POSIX system any format, allowed by strftime(3) can be used as value of this option. Under MS-
DOS xls2csv implements limited set of strftime formats, namely m, d, y, Y, b, l, p, H, M, S.
-V outputs version number
FILES
${HOME}/.catdocrc, catdoc charset files and substitution map files (see catdoc(1) manual page for details,
SEE ALSO cat(1), catdoc(1), strings(1), utf8(7), unicode(7)AUTHOR
V.B.Wagner <vitus@45.free.net>, based on biffview by David Rysdam
MS-Word reader Version 0.94.4 xls2csv(1)