Hi guys,
This is probably very easy but I've no idea how to pull this out.
Basically, I need to find errors into a very large logfile. When you grep the ID, the output is like this:
Those are multiple occurrences of the same action.
What I need to do is to take only one of these results (because they are identical) and show the next 30 lines in the file, starting from the grep line, to highlight the error.
Hi,
I need a command that would let ls show number of lines in each file rather than file size in KBs.
I tried using wc -l as a source of input to ls but I found a problem cutting the file name since wc generates a space delimited list.
Any suggestions?
Thanks.
GmMike. (1 Reply)
When i grep for a pattern the search results comes up with matching lines(some before the pattern and some after)...how can i limit the search so that it shows only the lines after the pattern specified (5 Replies)
Hi experts,
I want to grep a number 9366109380 from a file but it will also show me the next 5 lines. Below is the example-
when i grep 989366109380, i can also see the next 5 lines.
Line 1. <fullOperation>MAKE:NUMBER:9366109380:PPAY2;</fullOperation>
Line 2.... (10 Replies)
I've seen several examples of grep showing the filename the string was found in, but what I really need is grep to show the file details in long format (like ls -l would).
scenario is:
grep mobile_number todays_files
This will show me the string I'm after & which files they turn up in, but... (2 Replies)
Can I modify the grep command to show only a process name?
Currently I run ps -efa | grep chk_web to get the following:
mousr 3395 1 0 09:36:06 pts/10 0:00 sh /var/opt/scripts/chk_web.sh
Can this be changed in any way to get only:
/var/opt/scripts/chk_web.sh or chk_web.sh.
I... (3 Replies)
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
I have a file like
blah
blah blah blah
this is the text I need,
which might be between 1-4 lines, but
always has a blank line above and below
it, and is at the end of the text file
the code tags don't show the trailing blank line. I started by deleting the last blank line with:
... (2 Replies)
I am using grep as follows
grep --include \*.org -ir "sunspot" -C 3 ./astron_aphys/solarsy/sun/helioseism/localhs/fhankel/
This gives me the filename for each matched line. How can I change the command to print the file name only once rather than having the same file name repeated at... (2 Replies)
Hi,
can I make grep stop after finding the first occurrence of a regex in a line?
Given:
file with various regex patterns
file to be grep'ed
Sadly some of the regex patterns cannot be limited any further, so grep -Eiof patterns.txt file.txt (GNU grep 2.20) will give me possibly n hits... (4 Replies)
Discussion started by: stresing
4 Replies
LEARN ABOUT LINUX
snmp_framework_mib
snmp_framework_mib(3erl) Erlang Module Definition snmp_framework_mib(3erl)NAME
snmp_framework_mib - Instrumentation Functions for SNMP-FRAMEWORK-MIB
DESCRIPTION
The module snmp_framework_mib implements instrumentation functions for the SNMP-FRAMEWORK-MIB, and functions for initializing and configur-
ing the database.
The configuration files are described in the SNMP User's Manual.
EXPORTS
configure(ConfDir) -> void()
Types ConfDir = string()
This function is called from the supervisor at system start-up.
Inserts all data in the configuration files into the database and destroys all old data.
Thus, the data in the SNMP-FRAMEWORK-MIB, after this function has been called, is from the configuration files.
All snmp counters are set to zero.
If an error is found in the configuration file, it is reported using the function config_err/2 of the error report module, and the
function fails with reason configuration_error .
ConfDir is a string which points to the directory where the configuration files are found.
The configuration file read is: context.conf .
init() -> void()
This function is called from the supervisor at system start-up.
Creates the necessary objects in the database if they do not exist. It does not destroy any old values.
add_context(Ctx) -> Ret
Types Ctx = string()
Ret = {ok, Key} | {error, Reason}
Key = term()
Reason = term()
Adds a context to the agent config. Equivalent to one line in the context.conf file.
delete_context(Key) -> Ret
Types Key = term()
Ret = ok | {error, Reason}
Reason = term()
Delete a context from the agent config.
Ericsson AB snmp 4.19 snmp_framework_mib(3erl)