what if I want to grep out just the field that has the entire string HOST-RESOURCES-MIB::hrSWRunPath.18144 = STRING: "/usr/vendor/jdk15/bin/java in it?
reason why i'm asking is that, the value /usr/vendor/jdk15/bin/java is not always known. what is known is the "HOST-RESOURCES-MIB::hrSWRunPath.18144". So i run into problems trying to grab the entire string associated with that before the ---- delimiter.
for example:
searches only for single word
for single word
this is line three
match=$(grep -n -e "single" data.txt)
this command will stored "..... single ...... single" into search.
how can i grep the single word just from line 2 only?? (3 Replies)
Hi,
When we "grep" for a word in a file, it returns the lines containing the word that we searched for. Is there a way to display only the words and not the entire line containing them.
Thanks
Ananth (6 Replies)
Hi all,
FileOne
family balance >>>>>
0 0
0 0
java.io.FileNotFoundException: Settings.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
..
....
.....
.....
java.lang.NullPointerException
...
.....
......
Stacktrace:
at... (2 Replies)
Hi,
I have gone through may posts and dint find exact solution for my requirement.
I have file which consists below data and same file have lot of other data.
<MAPPING DESCRIPTION ='' ISVALID ='YES' NAME='m_TASK_UPDATE' OBJECTVERSION ='1'>
<MAPPING DESCRIPTION ='' ISVALID ='NO'... (11 Replies)
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Hi all
I have following file which I have to edit for research purpose
file:///tmp/moz-screenshot.png body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; } Drug: KRP-104 QD Drug: Placebo Drug: Metformin|Drug:... (15 Replies)
Hi,
Below is an example :
ST1 PREF: int1 AVAIL: int2
ST2 PREF :int1 AVAIL: int2
I need int1 to come in preferred variable while programming and int2 in available variable
Please help me doing so
Best regards,
Vishal (10 Replies)
Hi,
I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file.
Ex:
$ cat "sample.log"
I am searching for a word which is present in this file
We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
I have a file "test" with following contents:
cat test
abc
abcd_efg
abc_abc
I want to only grep for abc or abc_ without getting other results, how do I achieve this?
If I use grep -w abc test option I get only abc and not abc_.
If I use egrep "abc|abc_" test its still printing... (3 Replies)
Hi there,
I have data with similar structure as this:
CHR START-SNP END-SNP REF ALT PATIENT1 PATIENT2 PATIENT3 PATIENT4
chr1 69511 69511 A G homo hetero homo hetero
chr2 69513 69513 T C . hetero homo hetero
chr3 69814 69814 G C . . homo homo
chr4 69815 69815 C A hetero . . hetero
is... (10 Replies)
Discussion started by: daashti
10 Replies
LEARN ABOUT X11R4
snmpdf
SNMPDF(1) Net-SNMP SNMPDF(1)NAME
snmpdf - display disk space usage on a network entity via SNMP
SYNOPSIS
snmpdf [COMMON OPTIONS] [-Cu] AGENT
DESCRIPTION
snmpdf is simply a networked verison of the typical df command. It checks the disk space on the remote machine by examining the HOST-
RESOURCES-MIB's hrStorageTable or the UCD-SNMP-MIB's dskTable. By default, the hrStorageTable is preferred as it typically contains more
information. However, the -Cu argument can be passed to snmpdf to force the usage of the dskTable.
AGENT identifies a target SNMP agent, which is instrumented to monitor the gievn objects. At its simplest, the AGENT specification will
consist of a hostname or an IPv4 address. In this situation, the command will attempt communication with the agent, using UDP/IPv4 to port
161 of the given target host. See the snmpcmd(1) manual page for a full list of the possible formats for AGENT.
See the snmpd.conf(5) manual page on setting up the dskTable using the disk directive in the snmpd.conf file.
OPTIONS
COMMON OPTIONS
Please see snmpcmd(1) for a list of possible values for COMMON OPTIONS as well as their descriptions.
-Cu Forces the command to use dskTable in mib UCD-SNMP-MIB instead of the default to determine the storage information. Generally, the
default use of hrStorageTable in mib HOST-RESOURCES-MIB is preferred because it typically contains more information.
EXAMPLES
% snmpdf -v 2c -c public localhost
Description size (kB) Used Available Used%
/ 7524587 2186910 5337677 29%
/proc 0 0 0 0%
/etc/mnttab 0 0 0 0%
/var/run 1223088 32 1223056 0%
/tmp 1289904 66848 1223056 5%
/cache 124330 2416 121914 1%
/vol 0 0 0 0%
Real Memory 524288 447456 76832 85%
Swap Space 1420296 195192 1225104 13%
SEE ALSO snmpd.conf(5), snmp.conf(5)4th Berkeley Distribution 25 Jul 2003 SNMPDF(1)