Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Complicated SED search required Post 302371701 by otheus on Monday 16th of November 2009 05:16:50 AM
Old 11-16-2009
Hammer & Screwdriver

Quote:
Originally Posted by badoshi
You guys are a real lifesaver!
Wow, I didn't realize hospitals were using SNMP in their cardio defibrilators!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help in sed required.

Hi All, I am facing a small problem in sed. I want to insert a line in the existing file. Existing code: access to attr=userPassword by self write by * auth access to * by self write by users read by anonymous auth Desired code: access to attr=userPassword by self... (14 Replies)
Discussion started by: nua7
14 Replies

2. Shell Programming and Scripting

complicated search within file

Hi, I have following problem. I have a file with time stamps and some data describing what happened between time stamps. Something like this: 10:00 meeting with K meeting with L 11:00 lunch 12:00 work with K 13:00 From this file I have to get a file with... (7 Replies)
Discussion started by: mmike
7 Replies

3. Shell Programming and Scripting

Script Search replace - complicated

I have a text file for which i need a script which does some fancy search and replace. Basically i want to loop through each line, if i find an occurance of certain string format then i want to carry on search on replace another line, once i replaced this line i will contine to search for the... (7 Replies)
Discussion started by: kelseyh
7 Replies

4. Shell Programming and Scripting

Search complicated strings on file

Can someone help me? I been figuring out how I can search and extract a complicated search string from a file. The whole string is delimited by a period. And the file where I'm searching is composed of differnt string such as that. For example, I have this search string: and I have a file... (3 Replies)
Discussion started by: Orbix
3 Replies

5. Shell Programming and Scripting

Parsing complicated CSV file with sed

Yes, there is a great doc out there that discusses parsing csv files with sed, and this topic has been covered before but not enough to answer my question (unix.com forums). I'm trying to parse a CSV file that has optional quotes like the following: "Apple","Apples, are fun",3.60,4.4,"I... (3 Replies)
Discussion started by: analog999
3 Replies

6. Shell Programming and Scripting

sed help required

Hi All, I have one file with below type of data in it, $ cat test.txt ###123 ###xyxytuerwb ###2 ###tyupe Here I would like to replace all the characters with "x" after the 3 "###" with the same number of characters. Can you please help me to achieve this. (7 Replies)
Discussion started by: gr8_usk
7 Replies

7. Shell Programming and Scripting

sed with complicated variable pattern

Hi, Below is the content of the file how it looks: # EMAIL #export BMS_EMAIL_ENABLED=true export BMS_EMAIL_ENABLED=false #export BMS_EMAIL_SERVER=esasmtp01.kohls.com export BMS_EMAIL_SERVER=esasmtp01.kohls.com.SMTP_SERVICE export BMS_EMAIL_FROM_ADDRESS=ec_notify@kohlsectest.com export... (4 Replies)
Discussion started by: pravintse
4 Replies

8. Shell Programming and Scripting

sed help - search/copy from one file and search/paste to another

I am a newbie and would like some help with the following - Trying to search fileA for a string similar to - AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3 I then want to replace that string with a string from fileB - ... (5 Replies)
Discussion started by: ncwxpanther
5 Replies

9. UNIX for Beginners Questions & Answers

How to search a text in file and retrieve required lines following it with UNIX command?

I have requirement to search for a text in the file and retrieve required lines that is user defined with unix command. Eg: Find the text UNIX in the below file and need to return Test 8 & Test 9 Test 1 Test 2 Test 3 Test 4 UNIX Test 5 Test 6 Test 7 Test 8 Test 9 Result can... (8 Replies)
Discussion started by: Arunkumarsak4
8 Replies

10. UNIX for Beginners Questions & Answers

Assistance required to decode sed search using /1

Hi, I am trying to extract line number (first number), as well as everything from TSVal onwards. 4 1.474005 172.18.124.142 -> 74.125.228.46 TCP 2450940617 74 44021 > https Seq=0 Win=5840 Len=0 MSS=1380 SACK_PERM=1 TSval=2450940617 TSecr=0 WS=64 6 1.488149 172.18.124.142 ->... (1 Reply)
Discussion started by: sand1234
1 Replies
snmpc(3erl)						     Erlang Module Definition						       snmpc(3erl)

NAME
snmpc - Interface Functions to the SNMP toolkit MIB compiler DESCRIPTION
The module snmpc contains interface functions to the SNMP toolkit MIB compiler. EXPORTS
compile(File) compile(File, Options) -> {ok, BinFileName} | {error, Reason} Types File = string() Options = [opt()] opt() = db() | relaxed_row_name_assign_check() | deprecated() | description() | reference() | group_check() | i() | il() | imports() | module() | module_identity() | module_compliance() | agent_capabilities() | outdir() | no_defs() | verbosity() | warnings() db() = {db, volatile|persistent|mnesia} deprecated() = {deprecated, bool()} relaxed_row_name_assign_check() = relaxed_row_name_assign_check description() = description reference() = reference group_check() = {group_check, bool()} i() = {i, [dir()]} il() = {il, [dir()]} imports() = imports module() = {module, atom()} module_identity() = module_identity module_compliance() = module_compliance agent_capabilities() = agent_capabilities no_defs() = no_defs outdir() = {outdir, dir()} verbosity() = {verbosity, silence|warning|info|log|debug|trace} warnings() = {warnings, bool()} dir() = string() BinFileName = string() Compiles the specified MIB file <File>.mib . The compiled file BinFileName is called <File>.bin . * The option db specifies which database should be used for the default instrumentation. Default is volatile . * The option deprecated specifies if a deprecated definition should be kept or not. If the option is false the MIB compiler will ignore all deprecated definitions. Default is true . * The option relaxed_row_name_assign_check , if present, specifies that the row name assign check shall not be done strictly according to the SMI (which allows only the value 1). With this option, all values greater than zero is allowed (>= 1). This means that the error will be converted to a warning. By default it is not included, but if this option is present it will be. * The option description specifies if the text of the DESCRIPTION field will be included or not. By default it is not included, but if this option is present it will be. * The option reference specifies if the text of the REFERENCE field, when found in a table definition, will be included or not. By default it is not included, but if this option is present it will be. The reference text will be placed in the allocList field of the mib-entry record (#me{}) for the table. * The option group_check specifies whether the mib compiler should check the OBJECT-GROUP macro and the NOTIFICATION-GROUP macro for correctness or not. Default is true . * The option i specifies the path to search for imported (compiled) MIB files. The directories should be strings with a trailing directory delimiter. Default is ["./"] . * The option il (include_lib) also specifies a list of directories to search for imported MIBs. It assumes that the first element in the directory name corresponds to an OTP application. The compiler will find the current installed version. For example, the value ["snmp/mibs/"] will be replaced by ["snmp-3.1.1/mibs/"] (or what the current version may be in the system). The current directory and the <snmp-home>/priv/mibs/ are always listed last in the include path. * The option imports , if present, specifies that the IMPORT statement of the MIB shall be included in the compiled mib. * The option module , if present, specifies the name of a module which implements all instrumentation functions for the MIB. The name of all instrumentation functions must be the same as the corresponding managed object it implements. * The option module_identity , if present, specifies that the info part of the MODULE-IDENTITY statement of the MIB shall be included in the compiled mib. * The option module_compliance , if present, specifies that the MODULE-COMPLIANCE statement of the MIB shall be included (with a mib-entry record) in the compiled mib. The mib-entry record of the module-compliance will contain reference and module part(s) this info in the assocList field). * The option agent_capabilities , if present, specifies that the AGENT-CAPABILITIES statement of the MIB shall be included (with a mib-entry record) in the compiled mib. The mib-entry record of the agent-capabilitie will contain reference and modules part(s) this info in the assocList field). * The option no_defs , if present, specifies that if a managed object does not have an instrumentation function, the default instrumentation function should NOT be used, instead this is reported as an error, and the compilation aborts. * The option verbosity specifies the verbosity of the SNMP mib compiler. I.e. if warning, info, log, debug and trace messages shall be shown. Default is silence . Note that if the option warnings is true and the option verbosity is silence , warning messages will still be shown. * The option warnings specifies whether warning messages should be shown. Default is true . The MIB compiler understands both SMIv1 and SMIv2 MIBs. It uses the MODULE-IDENTITY statement to determine if the MIB is version 1 or 2. The MIB compiler can be invoked from the OS command line by using the command erlc . erlc recognizes the extension .mib , and invokes the SNMP MIB compiler for files with that extension. The options db , group_check , deprecated , description , verbosity , imports and module_identity have to be specified to erlc using the syntax +term . See erlc(1) for details. is_consistent(Mibs) -> ok | {error, Reason} Types Mibs = [MibName] MibName = string() Checks for multiple usage of object identifiers and traps between MIBs. mib_to_hrl(MibName) -> ok | {error, Reason} Types MibName = string() Generates a .hrl file with definitions of Erlang constants for the objects in the MIB. The .hrl file is called <MibName>.hrl . The MIB must be compiled, and present in the current directory. The mib_to_hrl generator can be invoked from the OS command line by using the command erlc . erlc recognizes the extension .bin , and invokes this function for files with that extension. SEE ALSO
erlc(1) Ericsson AB snmp 4.19 snmpc(3erl)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy