11-05-2015
Thanks ....But it still printing the same value.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies
2. Shell Programming and Scripting
Hi All,
The following is the scenario
id name
--------------
1 William;Johnson
2 Azim;Abdul
3 Grasim
.
.
etc....
I need the following output
id name
--------------
1 William
1 Johnson
2 Azim (2 Replies)
Discussion started by: kottursamy
2 Replies
3. Shell Programming and Scripting
Guys -- I am noob and I am really strugging on this one. I cant even write the pseudo code for it. I have a file that spits values in individual rows as such:
file:
user date type size
joe 2005-25-09 log 1
joe 2005-25-09 snd 10
joe 2005-25-09 rcd 12
joe 2005-24-09 log 2
joe... (1 Reply)
Discussion started by: made2last
1 Replies
4. Shell Programming and Scripting
I want to write a scrpit to merge files row wise (actually concatinating)
main.txt
X Y Z
file 1
A B C
file 2
1 2 3
now i want the script to check if the file1 is empty or not, if empty then make it like
A B C
1 2 3
again to check if second file is empty if not do as done... (0 Replies)
Discussion started by: shashi792
0 Replies
5. UNIX for Dummies Questions & Answers
Hello Everyone,
My issue is that I want to traverse a database table row by row and do some action on the value retrieved in each row.
I have gone through a lot of shell script questions/posts. I could find row by row traversal of a file but not a database table.
Please help.
Thanks &... (5 Replies)
Discussion started by: ahsan.asghar
5 Replies
6. Shell Programming and Scripting
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies
7. Shell Programming and Scripting
Comparing two files on row by row
File1
ecount~100
dcount~200
ccount~300
zxcscount~5000
and so on.
File2
ecount~100
dcount~203
ccount~300
zxcscount~5000
and so on.
If i use diff command (1 Reply)
Discussion started by: onesuri
1 Replies
8. UNIX for Beginners Questions & Answers
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)
Discussion started by: aachave1
36 Replies
9. Shell Programming and Scripting
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)
Discussion started by: kotra
4 Replies
10. UNIX for Beginners Questions & Answers
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)