Hi, this is my first post so here goes.....
I need help... I am trying to write a script to produce some stats based on a number of searches in a log file. Now i know how to do this using multiple variables which are really just greps, but I want a more efficent way of doing this as my poor... (1 Reply)
I'm using perl to do a grep of each line in a vendor file and find its occurrences in a specific directory. Any values found is saved in @dir.
.....(file opened, etc.)
....
while ($line=<FILE>){
@dir = `grep $line * `;
}
It's the specific usage of the system grep that I'm having... (7 Replies)
OK here's the situation:
I have got these lines which I have got to parse.
If the line contains a particular string and any element from a previously defined array I need to take that particular line and do some further processing.
if ((grep(/$_/,$1)) && (grep($pattern,@myarr)))
{
#Do... (2 Replies)
Hello
I want to grep a line from a file saved in some directory.
Can anyone please correct the code below:
#!/usr/bin/perl -w
$file = "/home/output.txt"
$grep_line = "closing zip for topic";
`grep $grep_line* $file`; (1 Reply)
Hi All i have this script that uses glob to look in /var/log/messages.*
my @messagefiles = glob "/var/log/messages.*";
and the code that uses it is this
grep { /NVRM: Xid/ } @messages)
but this spits out this
/var/log/messages-20111030:Oct 25 13:43:04 brent kernel: NVRM:... (10 Replies)
Im storing multiple functions in a varaible called $check...
The variable check contains the following:
a()
b()
c()
...
..etc
now im checking individually which function is kept in which file using GREP
if ( grep \$check \i, <FILE> )
The problem is im getting the output for the... (1 Reply)
Hi,
Can anybody let me know how this grep will work.
The input and output is not known.
Also can you give me the details of any link where i can find clearly about grep
Thanks in advance (1 Reply)
hello Everyone i am a newbie.
i have a file which contains the following
E:\gtmproj\script\i486_nt\obj\check_geomtools.exe: o:\portsrc\spg\system_1\i486_nt\advapps\TK-2\objmt\winclockmtq.lib
E:\gtmproj\script\i486_nt\obj\check_geomtools.exe:... (12 Replies)
I have an file which have data in lines as follows
ad, findline=24,an=54,ab=34,av=64,ab=7989,ab65=34,aj=323,ay=34,au=545,ad=5545
ab,abc,an10=23,an2=24,an31=32,findline=00,an33=23,an32=26,an40=45,ac23=5,ac=87,al=76,ad=26... (3 Replies)
Discussion started by: deepKrish
3 Replies
LEARN ABOUT DEBIAN
sbdict
SbDict(3) Coin SbDict(3)NAME
SbDict -
The SbDict class organizes a dictionary of keys and values.
It uses hashing to quickly insert and find entries in the dictionary. An entry consists of an unique key and a generic pointer.
SYNOPSIS
#include <Inventor/SbDict.h>
Public Types
typedef uintptr_t Key
Public Member Functions
SbDict (const int entries=251)
SbDict (const SbDict &from)
~SbDict ()
SbDict & operator= (const SbDict &from)
void applyToAll (SbDictApplyFunc *rtn) const
void applyToAll (SbDictApplyDataFunc *rtn, void *data) const
void clear (void)
SbBool enter (const Key key, void *const value)
SbBool find (const Key key, void *&value) const
void makePList (SbPList &keys, SbPList &values)
SbBool remove (const Key key)
void setHashingFunction (SbDictHashingFunc *func)
Detailed Description
The SbDict class organizes a dictionary of keys and values.
It uses hashing to quickly insert and find entries in the dictionary. An entry consists of an unique key and a generic pointer.
Constructor & Destructor Documentation
SbDict::SbDict (const intentries = 251)
Constructor with entries specifying the initial number of buckets in the hash list -- so it need to be larger than 0. Other than this, no
special care needs to be taken in choosing the value since it is always rounded up to the nearest power of two.
SbDict::SbDict (const SbDict &from)
Copy constructor.
SbDict::~SbDict ()
Destructor.
Member Function Documentation
SbDict & SbDict::operator= (const SbDict &from)
Make a shallow copy of the contents of dictionary from into this dictionary.
void SbDict::applyToAll (SbDictApplyFunc *rtn) const
Applies rtn to all entries in the dictionary.
void SbDict::applyToAll (SbDictApplyDataFunc *rtn, void *data) const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void SbDict::clear (void)
Clear all entries in the dictionary.
SbBool SbDict::enter (const Keykey, void *constvalue)
Inserts a new entry into the dictionary. key should be a unique number, and value is the generic user data.
If key does not exist in the dictionary, a new entry is created and TRUE is returned. Otherwise, the generic user data is changed to value,
and FALSE is returned.
SbBool SbDict::find (const Keykey, void *&value) const
Searches for key in the dictionary. If an entry with this key exists, TRUE is returned and the entry value is returned in value. Otherwise,
FALSE is returned.
void SbDict::makePList (SbPList &keys, SbPList &values)
Creates lists with all entries in the dictionary.
SbBool SbDict::remove (const Keykey)
Removes the entry with key key. TRUE is returned if an entry with this key was present, FALSE otherwise.
void SbDict::setHashingFunction (SbDictHashingFunc *func)
Sets a new hashing function for this dictionary. Default hashing function just returns the key.
If you find that items entered into the dictionary seems to make clusters in only a few buckets, you should try setting a hashing function.
If you're for instance using strings, you could use the static SbString::hash() function (you'd need to make a static function that will
cast from SbDict::Key to char * of course).
This function is not part of the OIV API.
Author
Generated automatically by Doxygen for Coin from the source code.
Version 3.1.3 Wed May 23 2012 SbDict(3)