03-03-2012
Quote:
If a record has a carriage return (octal 015) then I append the second record to the first record.
Please explain this process in minute detail and include before and after sample data which shows where the carriage-return character(s) may be found in a record and whether you need to RETAIN the carriage-return characters in the output or REMOVE them.
Is this one of those cases where carriage-return characters are valid in a string within a database record?
10 More Discussions You Might Find Interesting
1. Programming
hi
i have a peculiar problem...i have a number of stirngs separated by a '/0'. it looks somethings like:
char test="abk\0jsdhj\01234\0"
actually i will be reading this from a file or something...
im supposed to change the \0 to a ','
but in C the octal representation starts with a '\'...... (1 Reply)
Discussion started by: strider
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Is there any way to display the permissions in octal format rather than "rwxrwxrwx" format.
I have a file and i want to see the permissions in octal format. Please help. (11 Replies)
Discussion started by: venkatesht
11 Replies
3. Shell Programming and Scripting
Hi All,
can some one figure out the syntax issue here. How to overcome this?
#!/bin/sh
$ HFR_MAIL=NO
$ PRP_MAIL=NO
$ MC_MAIL=NO
$ if && && ]; then
> echo "NO "
> else
> echo "YES"
> fi
test: unknown operator NO
$ if && && ]; then
> echo "NO"
> else
> echo "YES"
>... (4 Replies)
Discussion started by: shellscripter
4 Replies
4. Shell Programming and Scripting
Hello everybody,
I would like to understand why the printf function is returning me an octal value with this command :
printf %4.4d 0010 returns 0008
printf %4.4d 10 returns 0010
Thanks for help. (3 Replies)
Discussion started by: dolphin06
3 Replies
5. Shell Programming and Scripting
Hi
what's the correct way of writing if
1)if "$time_diff" -gt 5
then
echo "killing hung process \n"
fi
2)if test $time_diff -gt 5
then
echo "killing hung process \n"
fi
where -time_diff=$(($Sam - $current_min))
and current_min=`date +%M`
infact both are giving Syntax... (1 Reply)
Discussion started by: Anteus
1 Replies
6. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
7. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
8. UNIX for Dummies Questions & Answers
I have some junk values in my files
鵶„‰¼±¤¡ad. am able to find the octal values as below by using od command.
303 251 265 266 204 211 274 261 244 241 141 144
i want to know how to delete the octal this values . (5 Replies)
Discussion started by: vino.paal
5 Replies
9. UNIX for Dummies Questions & Answers
Hi guys here i'm again with more question
The code below try to find an user and write everything about him if exist, so my problem appear on line of test, where the program test if the user has secondary groups related. The rest it's clear
# usugrup.sh lista todas las caracteristicas de un... (3 Replies)
Discussion started by: Newer
3 Replies
10. Shell Programming and Scripting
Here are a few lines from my script. The problem I am having is that the statement for gstat returns this error:
line 43:
The statement is coming from gstat.
Is there a way to fix it? Apparently -eq 02 is coming up as some octal value, I need it to be recognized as 02.
Apparently in... (4 Replies)
Discussion started by: newbie2010
4 Replies
LEARN ABOUT CENTOS
tcamgr
TCATEST(3) Tokyo Cabinet TCATEST(3)
NAME
tcamgr - the command line utility of the abstract database API
DESCRIPTION
The command `tcamgr' is a utility for test and debugging of the abstract database API and its applications. `name' specifies the name of a
database. `key' specifies the key of a record. `value' specifies the value of a record. `params' specifies the tuning parameters.
`func' specifies the name of a function. `arg' specifies the arguments of the function. `dest' specifies the path of the destination
file.
tcamgr create name
Create a database file.
tcamgr inform name
Print miscellaneous information to the standard output.
tcamgr put [-sx] [-sep chr] [-dk|-dc|-dai|-dad] name key value
Store a record.
tcamgr out [-sx] [-sep chr] name key
Remove a record.
tcamgr get [-sx] [-sep chr] [-px] [-pz] name key
Print the value of a record.
tcamgr list [-sep chr] [-m num] [-pv] [-px] [-fm str] name
Print keys of all records, separated by line feeds.
tcamgr optimize name params
Optimize a database file.
tcamgr misc [-sx] [-sep chr] [-px] name func [arg...]
Call a versatile function for miscellaneous operations.
tcamgr map [-fm str] name dest
Map records into another B+ tree database.
tcamgr version
Print the version information of Tokyo Cabinet.
Options feature the following.
-sx : the input data is evaluated as a hexadecimal data string.
-sep chr : specify the separator of the input data.
-dk : use the function `tcadbputkeep' instead of `tcadbput'.
-dc : use the function `tcadbputcat' instead of `tcadbput'.
-dai : use the function `tcadbaddint' instead of `tcadbput'.
-dad : use the function `tcadbadddouble' instead of `tcadbput'.
-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.
-fm str : specify the prefix of keys.
This command returns 0 on success, another on failure.
SEE ALSO
tcatest(1), tcamttest(1), tcadb(3), tokyocabinet(3)
Man Page 2012-08-18 TCATEST(3)