07-03-2007
character removal
xander, yes the code works but it doesnt terminate if locks up and it also doesnt change the source file. that is what i want to accomplish.here is the part of the file as it apears.
RPNUM: 903-310-7076B
i want to remove the 'B' so the dialer can call the num
my way will remove the num from the output but not the source file
also it freezes.
the other examples didnt seem to works
thanks everybody
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to put the single line contents of a file into a variable, but remove the last character, for example the file would have this sort of contents:
2;4;3;10;67;54;96;
And I want the variable to be:
2;4;3;10;67;54;96 (notice the last ";" has gone).
Unfortunately I can't just... (4 Replies)
Discussion started by: danhodges99
4 Replies
2. Programming
Does anyone knows how to write a program to remove single-line comment in C program?
that means it don't read anything behind // (3 Replies)
Discussion started by: Icy002
3 Replies
3. Shell Programming and Scripting
I've been looking on the internet, and haven't found anything simple enough to use in my code. All I want to do is count how many times "-" occurs in a string of characters (as a package name). It seems it should be very simple, and shouldn't require more than one line to accomplish.
And this is... (2 Replies)
Discussion started by: Shingoshi
2 Replies
4. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
5. Shell Programming and Scripting
Hi,
I should read one character at a fixed position from each line of the file. So how ??? should be substituted in the code below:
while read line ; do
single_char=`???`
echo "$single_char"
done < $input_file (8 Replies)
Discussion started by: arsii
8 Replies
6. Shell Programming and Scripting
Hi,
I have a file with lines such as the below. I want to remove the comma only if it is the first character on a line. I can't work out how to do this using sed.
*ELSET, ELSET=WHEEL_TD2
63, 64, 65, 72, 82, 88, 89, 92, 120, 121, 152, 181, 190, 221, 252, 259
, 260, 282, 283, 285, 286,... (2 Replies)
Discussion started by: carlr
2 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
Does anyone know how to remove the last character in each of the line?
This is what I have:
ABCDE.1
GLSJD.2
HIJPL.2
HKAGB.3
IUBWQ.1
What I want (remove the dot and number):
ABCDE
GLSJD
HIJPL
HKAGB
IUBWQ
I tried to use this: sed 's/.*//'
But I'm not sure if that is... (3 Replies)
Discussion started by: narachaid
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am trying to remove multi line and single line comments like examples below
I have tried this pattern. it works fine for single line comments and multi line comments in a single line only. but this fails when the comments are extended in multiple lines as shown in the comment 2 of... (3 Replies)
Discussion started by: ahmedwaseem2000
3 Replies
9. Shell Programming and Scripting
Regarding copy/pasted text of copyright-free book from archive.org (link below), in attempt to expand single-line-break paragraph text (not section headings or paragraph breaks) to wider right margin, Justify or Wrap in LIbreOffice is not working, and Find/Replace the paragraph mark ($) wraps all... (2 Replies)
Discussion started by: p1ne
2 Replies
10. Shell Programming and Scripting
Hi All,
So I have to remove all the @hostnames from a file, the problem is, there are instances where @ is used for other things... For example:
example text:
@This is some text in between some at signs@
@This is some more text@
This is a line that will contain a username and his/her... (5 Replies)
Discussion started by: joeg1484
5 Replies
LEARN ABOUT DEBIAN
tcbtest
TCBTEST(1) Tokyo Cabinet TCBTEST(1)
NAME
tcbtest - test cases of the B+ tree database API
DESCRIPTION
The command `tcbtest' is a utility for facility test and performance test. This command is used in the following format. `path' specifies
the path of a database file. `rnum' specifies the number of iterations. `lmemb' specifies the number of members in each leaf page.
`nmemb' specifies the number of members in each non-leaf page. `bnum' specifies the number of buckets. `apow' specifies the power of the
alignment. `fpow' specifies the power of the free block pool.
tcbtest write [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc num] [-nc num] [-xm num] [-df num] [-ls num] [-ca num] [-nl|-nb]
[-rnd] path rnum [lmemb [nmemb [bnum [apow [fpow]]]]]
Store records with keys of 8 bytes. They change as `00000001', `00000002'...
tcbtest read [-mt] [-cd|-ci|-cj] [-lc num] [-nc num] [-xm num] [-df num] [-nl|-nb] [-wb] [-rnd] path
Retrieve all records of the database above.
tcbtest remove [-mt] [-cd|-ci|-cj] [-lc num] [-nc num] [-xm num] [-df num] [-nl|-nb] [-rnd] path
Remove all records of the database above.
tcbtest rcat [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc num] [-nc num] [-xm num] [-df num] [-ls num] [-ca num] [-nl|-nb] [-pn
num] [-dai|-dad|-rl|-ru] path rnum [lmemb [nmemb [bnum [apow [fpow]]]]]
Store records with partway duplicated keys using concatenate mode.
tcbtest queue [-mt] [-cd|-ci|-cj] [-tl] [-td|-tb|-tt|-tx] [-lc num] [-nc num] [-xm num] [-df num] [-ls num] [-ca num] [-nl|-nb] path
rnum [lmemb [nmemb [bnum [apow [fpow]]]]]
Perform queueing and dequeueing.
tcbtest misc [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] path rnum
Perform miscellaneous test of various operations.
tcbtest wicked [-mt] [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] path rnum
Perform updating operations selected at random.
Options feature the following.
-mt : call the function `tchdbsetmutex'.
-cd : use the comparison function `tccmpdecimal'.
-ci : use the comparison function `tccmpint32'.
-cj : use the comparison function `tccmpint64'.
-tl : enable the option `BDBTLARGE'.
-td : enable the option `BDBTDEFLATE'.
-tb : enable the option `BDBTBZIP'.
-tt : enable the option `BDBTTCBS'.
-tx : enable the option `BDBTEXCODEC'.
-lc num : specify the number of cached leaf pages.
-nc num : specify the number of cached non-leaf pages.
-xm num : specify the size of the extra mapped memory.
-df num : specify the unit step number of auto defragmentation.
-ls num : specify the maximum size of each leaf page.
-ca num : specify the capacity number of records.
-nl : enable the option `BDBNOLCK'.
-nb : enable the option `BDBLCKNB'.
-rnd : select keys at random.
-wb : use the function `tcbdbget3' instead of `tcbdbget'.
-pn num : specify the number of patterns.
-dai : use the function `tcbdbaddint' instead of `tcbdbputcat'.
-dad : use the function `tcbdbadddouble' instead of `tcbdbputcat'.
-rl : set the length of values at random.
-ru : select update operations at random.
This command returns 0 on success, another on failure.
SEE ALSO
tcbmttest(1), tcbmgr(1), tcbdb(3), tokyocabinet(3)
Man Page 2011-02-12 TCBTEST(1)