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, all
I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes.
sample input:
for this line, 5 fields are supposed to be extracted, they... (8 Replies)
Hello there,
I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process.
Input in the csv file is ,
1,234,"abc,12,gh","GH234TY",34
I need output like below,... (8 Replies)
Hi All,
I want to replace the commas which are not inside parenthesis,quotes
if input is
abc,,lm,(no,pq,rs),{tu,vw,xy},zs,"as,as,fr",'ab,cd,ef'
output should be
abc lm (no,pq,rs) {tu,vw,xy} zs "as,as,fr" 'ab,cd,ef'
I tried this str.replaceAll("\\(.*?\\)|(,)", " "); say my string... (3 Replies)
Hi All,
I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes.
Sample Data :
"221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
Hi All,
I am getting .csv file whenever there is a comma present between a field that field get enclosed with double quotes
For eg as below
abc,123,xxyy,2178
fgh,123,"x,x"yy",2178
ghi,123,"x,xyy",2178
jkl,123,xx"yy,2178
whereas I want my data as per below
abc,123,xxyy,2178... (1 Reply)
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)
Please use code tags
Hi,
I have input data is below format and n of column in the multiple flat files. the string data has any double quotes(") values replaced to double double quotes for all the columns{"").
Also, my input flat file each column string data has carriage of new line too.... (14 Replies)
Hi,
I have below requirement.
Apple
Orange
Banana
Required O/p in bash
'Apple,Orange,Banana'
Can you please help.
Please wrap your samples, codes in CODE TAGS as per forum rules. (3 Replies)
Discussion started by: Rtk
3 Replies
LEARN ABOUT DEBIAN
tcfmgr
TCFMGR(1) Tokyo Cabinet TCFMGR(1)NAME
tcfmgr - the command line utility of the fixed-length database API
DESCRIPTION
The command `tcfmgr' is a utility for test and debugging of the fixed-length database API and its applications. `path' specifies the path
of a database file. `width' specifies the width of the value of each record. `limsiz' specifies the limit size of the database file.
`key' specifies the key of a record. `value' specifies the value of a record. `file' specifies the input file.
tcfmgr create path [width [limsiz]]
Create a database file.
tcfmgr inform [-nl|-nb] path
Print miscellaneous information to the standard output.
tcfmgr put [-nl|-nb] [-sx] [-dk|-dc|-dai|-dad] path key value
Store a record.
tcfmgr out [-nl|-nb] [-sx] path key
Remove a record.
tcfmgr get [-nl|-nb] [-sx] [-px] [-pz] path key
Print the value of a record.
tcfmgr list [-nl|-nb] [-m num] [-pv] [-px] [-rb lkey ukey] [-ri str] path
Print keys of all records, separated by line feeds.
tcfmgr optimize [-nl|-nb] path [width [limsiz]]
Optimize a database file.
tcfmgr importtsv [-nl|-nb] [-sc] path [file]
Store records of TSV in each line of a file.
tcfmgr version
Print the version information of Tokyo Cabinet.
Options feature the following.
-nl : enable the option `FDBNOLCK'.
-nb : enable the option `FDBLCKNB'.
-sx : the input data is evaluated as a hexadecimal data string.
-dk : use the function `tcfdbputkeep' instead of `tcfdbput'.
-dc : use the function `tcfdbputcat' instead of `tcfdbput'.
-dai : use the function `tcfdbaddint' instead of `tcfdbput'.
-dad : use the function `tcfdbadddouble' instead of `tcfdbput'.
-px : the output data is converted into a hexadecimal data string.
-pz : do not append line feed at the end of the output.
-m num : specify the maximum number of the output.
-pv : print values of records also.
-rb lkey ukey : specify the range of keys.
-ri str : specify the interval notation of keys.
-sc : normalize keys as lower cases.
This command returns 0 on success, another on failure.
SEE ALSO tcftest(1), tcfmttest(1), tcfdb(3), tokyocabinet(3)Man Page 2011-02-12 TCFMGR(1)