Can you please explain more...because, from the data you shown above, how do you get the result you provided for identical cols 1 & 2.
Anyways, if you want unique col 1 & 2
I think maybe I did not describe well my problem. I don't want unique Cols1 and 2. I need to remove all unique Col 2. (regardless of what is in Col 1.), In the example I provided, you can see that the Col 2 that remains are duplicates while the Col 2 that were unique are discarded.
Hi folks - hope you are all well.
I am trying to perform some pre-processing on a data file, to make sure it is in a valid format before performing a data upload.
Each row of data in the file should consist of 10 comma delimited fields.
Can anyone advise me of a sed/awk command that might... (2 Replies)
Hi all! Im wondering if its possible to remove all lines between two lines. Im working with a document like this:
data1
data2
<Remove>
data3
data4
</Remove>
data5
data6
I need it to end up like this if that possible:
data1
data2
data5
data6
There are multiple instances of... (2 Replies)
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)
hello all,
I have an input file with four columns like this with a lot of lines
and for example, line 1 and line 5 match because the first 4 characters match and the fourth column matches too. I want to keep the line that has the lowest number in the third column. So I discard line 5.... (5 Replies)
I would like to print unique lines without sort or unique. Unfortunately the server I am working on does not have sort or unique. I have not been able to contact the administrator of the server to ask him to add it for several weeks. (7 Replies)
Hi Every one, my requirement is to remove the null columns in line, comma delimiter used
For example,
A,11,20,30,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
B1,,,,,, gem,plum,kite,,,,gud,bad,,,,,,,,,,,,,
B2,kiing,kong,height,,,,,,,,,,,,,,,,,,,,,,,,,rak,,,,,,,,,,,,,
B1,,,,,,... (9 Replies)
Hello,
I would like to ask for help with csh script.
An example of an input in .txt file is below, the number of lines varies from file to file and I have 2 or 3 columns with values. I would like to read all the values (probably one by one) and set them to independent unique variables that... (7 Replies)
Discussion started by: FMMOLA
7 Replies
LEARN ABOUT LINUX
snmpa_local_db
snmpa_local_db(3erl) Erlang Module Definition snmpa_local_db(3erl)NAME
snmpa_local_db - The SNMP built-in database
DESCRIPTION
The module snmpa_local_db contains functions for implementing tables (and variables) using the SNMP built-in database. The database exists
in two instances, one volatile and one persistent. The volatile database is implemented with ets. The persistent database is implemented
with dets.
There is a scaling problem with this database.
* Insertions and deletions are inefficient for large tables.
This problem is best solved by using Mnesia instead.
The following functions describe the interface to snmpa_local_db . Each function has a Mnesia equivalent. The argument NameDb is a tuple
{Name, Db} where Name is the symbolic name of the managed object (as defined in the MIB), and Db is either volatile or persistent . mnesia
is not possible since all these functions are snmpa_local_db specific.
COMMON DATA TYPES
In the functions defined below, the following types are used:
* NameDb = {Name, Db}
* Name = atom(), Db = volatile | persistent
* RowIndex = [int()]
* Cols = [Col] | [{Col, Value}], Col = int(), Value = term()
where RowIndex denotes the last part of the OID, that specifies the index of the row in the table. Cols is a list of column numbers in case
of a get operation, and a list of column numbers and values in case of a set operation.
EXPORTS
dump() -> ok | {error, Reason}
Types Reason = term()
This function can be used to manually dump the database to file.
match(NameDb, Pattern)
Performs an ets/dets matching on the table. See Stdlib documentation, module ets, for a description of Pattern and the return val-
ues.
print()
print(TableName)
print(TableName, Db)
Types TableName = atom()
Prints the contents of the database on screen. This is useful for debugging since the STANDARD-MIB and OTP-SNMPEA-MIB (and maybe
your own MIBs) are stored in snmpa_local_db .
TableName is an atom for a table in the database. When no name is supplied, the whole database is shown.
table_create(NameDb) -> bool()
Creates a table. If the table already exist, the old copy is destroyed.
Returns false if the NameDb argument is incorrectly specified, true otherwise.
table_create_row(NameDb, RowIndex, Row) -> bool()
Types Row = {Val1, Val2, ..., ValN}
Val1 = Val2 = ... = ValN = term()
Creates a row in a table. Row is a tuple with values for all columns, including the index columns.
table_delete(NameDb) -> void()
Deletes a table.
table_delete_row(NameDb, RowIndex) -> bool()
Deletes the row in the table.
table_exists(NameDb) -> bool()
Checks if a table exists.
table_get_row(NameDb, RowIndex) -> Row | undefined
Types Row = {Val1, Val2, ..., ValN}
Val1 = Val2 = ... = ValN = term()
Row is a tuple with values for all columns, including the index columns.
SEE ALSO ets(3erl), dets(3erl), snmp_generic(3erl)Ericsson AB snmp 4.19 snmpa_local_db(3erl)