Hi,
I wrote below small script which will add up each row value from a file and print the total, but it is not.plz let me know what is wrong.script hangs and not displaying anything.
-----------------
while read line ; do
sum=0;
sum=$sum+$line;
done
echo $sum;
exit 0;
------------------... (8 Replies)
Hi,
I need help on doing the below thing in shell script.
I have a file with millions of rows called "abc.txt". i have another file with millions of rows called "xyz.txt".
I would like to do the below operation.
Open the abc.txt, read the first line, do some operations on the column... (2 Replies)
Hello,
I want to make a script to do this :
the file is with line :
TOTO TEST1
TOTO TEST2
TITI TEST1
TITI TEST2
TITI TEST3
i want he become :
TOTO TEST1 TEST2
TITI TEST1 TEST2 TEST3 (3 Replies)
Hi, I want to move a new row to another table if the field from new row doesn't have the first word that I categorized (like: IRC blablabla, PTM blablabla, ADM blablabla, BS blablabla).
I already use this script but doesn't work as I expected.
CHECK_KEYWORD="$( mysql -uroot -p123456 smsd -N... (7 Replies)
Hi, I already succeed moving a new row to another table if the field from new row doesn't have the first word that I categorized (like: IRC blablabla, PTM blablabla, ADM blablabla, BS blablabla).
But it can't delete the old row. Please help me with the script.
my php script:
INSERT INTO... (2 Replies)
Hello,
I need some help to reformat this table-by-row to matrix?
infile:
site1 A:o,p,q,r,s,t
site1 C:y,u
site1 T:v,w
site1 -:x,z
site2 A:p,r,t,v,w,z
site2 C:u,y
site2 G:q,s
site2 -:o,x
site3 A:o,q,s,t,u,z
site3 C:y
site3 T:v,w,x
site3 -:p,routfile:
SITE o p q r s t v u w x y... (7 Replies)
My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here.
Original File 1:
... (36 Replies)
Hi ALL,
We have requirement in a file, i have multiple rows.
Example below:
Input file rows
01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212
01,1,102319,0,1,80,20,U,1,241,00000059420000006021
I need my output file should be as mentioned below. Last field should split for... (4 Replies)
This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6).
The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 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)