Hello -
QUESTION:
Is there a way to override the default record length limitation over awk in Unix?
Or, is there a better way to do what I am trying to do than the way I am trying to do it now? (See BACKGROUND and CURRENT PROCEDURE below...)
BACKGROUND:
In a Kornshell script, I have... (1 Reply)
Hi All,
I have a txt file which is an export of a query result from the database. The txt file contains 'Processid#sqlquery' from the database table.As the sqlquery is too long.... i am unable to get the fields seperated using the awk script as below:-
cat sql.txt | awk -F'#' '{printf $2}'... (2 Replies)
Hi Guys,
I wanted to print the length of each record and the record itself.
I tried the following awk ...
awk 'a=length(); {print $a,$0}' file1
But it is giving me the records instead of length.
and also, it giving me each record twice. Means the value of a is not the length of the... (0 Replies)
Hi
I use the following code to read the file and to fix the length of the column of the record in the file 'Sample.txt'
ls Samp* | awk '
{ a=$1 }
END{
FS="n"
for(i=1;i<=NR;i++)
{
while( getline < a )
{
f1=$0;
print("Line::",f1);
f2=substr(f1,1,10)
print("Field1::",f2);... (10 Replies)
Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types:
(H)eader Records
(D)etail Records
(T)railer Records
The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Hi,
The record length may be differ in afile. I want to display the records if the record length is not equal to 50 using sed/awk command.
Thanks in Advance (6 Replies)
Hi all,
We are going through a total migration from AIX-based server framework to Linux-based servers. When I am testing *.sh and *.awk in a lower environments, it abends at the same step everytime in verifying the record length of the first row of the source file.
I know this source file... (11 Replies)
Hi Team,
I have an issue to split the file which is having special chracter(German Char) using awk command.
I have a different length records in a file. I am separating the files based on the length using awk command.
The command is working fine if the record is not having any... (7 Replies)
Discussion started by: Anthuvan
7 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)