01-12-2010
anbu23,
Perfect! Thank you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
For example suppose I have a file which contains data as:
$cat data
800,2
100,9
700,3
100,9
200,8
100,3
Now I want the output as
200,8
700,3
800,2
Key is first three characters, I don't want any reords which are having duplicate keys.
Like sort +0.0 -0.3 data can we use... (9 Replies)
Discussion started by: sumitc
9 Replies
2. Shell Programming and Scripting
hii i have a huge amt of data stored in a file.Here in this file i need to remove duplicates rows in such a way that the last column has different data & i must check for greatest among last colmn data & print the largest data along with other entries but just one of other duplicate entries is... (16 Replies)
Discussion started by: reva
16 Replies
3. UNIX for Dummies Questions & Answers
Hello guys,
should be a very easy questn for you:
I need to delete strings in file1 based on the list of strings in file2.
like file2:
word1_word2_
word3_word5_
word3_word4_
word6_word7_
file1:
word1_word2_otherwords..,word3_word5_others... (7 Replies)
Discussion started by: roussine
7 Replies
4. UNIX for Advanced & Expert Users
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies
5. Shell Programming and Scripting
The question is not as simple as the title... I have a file, it looks like this
<string name="string1">RZ-LED</string>
<string name="string2">2.0</string>
<string name="string2">Version 2.0</string>
<string name="string3">BP</string>
I would like to check for duplicate entries of... (11 Replies)
Discussion started by: raidzero
11 Replies
6. Shell Programming and Scripting
if I have the following lines in a file app.log
some lines here
<AAAA>
abc
<id>123456789</id>
ddd
</AAAA>some lines here too
<BBBB>
abc
<id>123456789</id>
ddd
</BBBB>some lines here too
<AAAA>
xyz
<id>987654321</id>
ssss
</AAAA>some lines here again...
How do I get the... (5 Replies)
Discussion started by: nariwithu
5 Replies
7. Shell Programming and Scripting
Hi,
i need help to remove duplicates in my file. The problem is i need to delete one duplicate for each line only. the input file as follows and it is not tab delimited:-
The output need to remove 2nd word (in red) that duplicate with 1st word (in blue). Other duplicates should remained... (12 Replies)
Discussion started by: redse171
12 Replies
8. Shell Programming and Scripting
Within my text file i have several thousand lines of text with some lines containing duplicate strings/words. I would like to entirely remove those lines which contain the duplicate strings.
Eg;
One and a Two
Unix.com is the Best
This as a Line Line
Example duplicate sentence with the word... (22 Replies)
Discussion started by: martinsmith
22 Replies
9. Shell Programming and Scripting
Hi,
I have an input file as shown below:
20140102;13:30;FR-AUD-LIBOR-1W;2.495
20140103;13:30;FR-AUD-LIBOR-1W;2.475
20140106;13:30;FR-AUD-LIBOR-1W;2.495
20140107;13:30;FR-AUD-LIBOR-1W;2.475
20140108;13:30;FR-AUD-LIBOR-1W;2.475
20140109;13:30;FR-AUD-LIBOR-1W;2.475... (2 Replies)
Discussion started by: shash
2 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have a file with around 1000 rows and one of the fields is an account number. I have been provided with a few account numbers, when any of the account number appears in a row then the row has to be deleted.
Can we place the account numbers in an array and use awk or sed for this task?... (3 Replies)
Discussion started by: mrcool4
3 Replies
LEARN ABOUT DEBIAN
otr_toolkit
OTR_PARSE(1) General Commands Manual OTR_PARSE(1)
NAME
otr_parse, otr_sesskeys, otr_mackey, otr_readforge, otr_modify, otr_remac - Process Off-the-Record Messaging transcripts
SYNOPSIS
otr_parse
otr_sesskeys our_privkey their_pubkey
otr_mackey aes_enc_key
otr_readforge aes_enc_key [newmsg]
otr_modify mackey old_text new_text offset
otr_remac mackey flags snd_keyid rcv_keyid pubkey counter encdata revealed_mackeys
DESCRIPTION
Off-the-Record (OTR) Messaging allows you to have private conversations over IM by providing:
- Encryption
- No one else can read your instant messages.
- Authentication
- You are assured the correspondent is who you think it is.
- Deniability
- The messages you send do not have digital signatures that are
checkable by a third party. Anyone can forge messages after a
conversation to make them look like they came from you. However,
during a conversation, your correspondent is assured the messages
he sees are authentic and unmodified.
- Perfect forward secrecy
- If you lose control of your private keys, no previous conversation
is compromised.
The OTR Toolkit is useful for analyzing and/or forging OTR messages. Why do we offer this? Primarily, to make absolutely sure that tran-
scripts of OTR conversations are really easy to forge after the fact. [Note that during an OTR conversation, messages can't be forged
without real-time access to the secret keys on the participants' computers, and in that case, all security has already been lost.] Easily-
forgeable transcripts help us provide the "Deniability" property: if someone claims you said something over OTR, they'll have no proof, as
anyone at all can modify a transcript to make it say whatever they like, and still have all the verification come out correctly.
Here are the six programs in the toolkit:
- otr_parse
- Parse OTR messages given on stdin, showing the values of all the
fields in OTR protocol messages.
- otr_sesskeys our_privkey their_pubkey
- Shows our public key, the session id, two AES and two MAC keys
derived from the given Diffie-Hellman keys (one private, one public).
- otr_mackey aes_enc_key
- Shows the MAC key derived from the given AES key.
- otr_readforge aes_enc_key [newmsg]
- Decrypts an OTR Data message using the given AES key, and displays
the message.
- If newmsg is given, replace the message with that one, encrypt
and MAC it properly, and output the resulting OTR Data Message.
This works even if the given key was not correct for the original
message, so as to enable complete forgeries.
- otr_modify mackey old_text new_text offset
- Even if you can't read the data because you don't know either
the AES key or the Diffie-Hellman private key, but you can make a
good guess that the substring "old_text" appears at the given
offset in the message, replace the old_text with the new_text
(which must be of the same length), recalculate the MAC with the
given mackey, and output the resulting Data message.
- Note that, even if you don't know any text in an existing message,
you can still forge messages of your choice using the
otr_readforge command, above.
- otr_remac mackey flags snd_keyid rcv_keyid pubkey counter encdata revealed_mackeys
- Make a new OTR Data Message, with the given pieces (note that the
data part is already encrypted). MAC it with the given mackey.
SEE ALSO
Off-the-Record Messaging, at http://www.cypherpunks.ca/otr/ <http://www.cypherpunks.ca/otr/>
AUTHOR
otr_toolkit was written by the OTR Dev Team <otr@cypherpunks.ca>.
October 27, 2005 OTR_PARSE(1)