Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Complicated SED search required Post 302371465 by thegeek on Sunday 15th of November 2009 01:49:13 AM
Old 11-15-2009
tr, and sed can do the trick...

Code:
$ tr '\n' ' ' < t1 | sed -rn 's/.*(DESCRIPTION[^"]*")([^"]*)".*/\2/p;' | sed -rn 's/[ \t]+/ /gp'
Storage System fan status change. The agent has detected a change in the Fan Status of a storage system. The variable cpqSsBoxFanStatus indicates the current fan status. User Action: If the fan status is degraded or failed, replace any failed fans.

Note: t1 should have the specified content.
 

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
DBCOOL(4)						   BSD Kernel Interfaces Manual 						 DBCOOL(4)

NAME
dbcool, adm1027, adm1030, adm1031, adt7463, adt7466, adt7467, adt7468, adt7473, adt7475, adt7476, adt7490, emc6d103s -- dbCool(tm) family of environmental monitors and fan controllers SYNOPSIS
dbcool* at ki2c? dbcool* at iic? addr 0x2e DESCRIPTION
The dbcool driver provides support for the Analog Devices dbCool and the SMSC EMC6D103S environmental monitor chips to be used with the envsys(4) API. These chips support up to fifteen sensors. Not all of the following sensors are supported on all chips. Sensor Units Typical Use l_temp uK local chip temperature r1_temp uK CPU temperature r2_temp uK GPU temperature Vccp uV DC CPU Vcore Vcc uV DC Chip's supply voltage 2.5V uV DC 2.5V supply 5V uV DC 5V supply 12V uV DC 12V supply Vtt uV DC PECI ref. voltage (2.25V ref, ADT7490 only) Imon uV DC Current monitor (2.25V ref, ADT7490 only) AIN1 uV DC Analog In (2.25V ref, ADT7466 only) AIN2 uV DC Analog In (2.25V ref, ADT7466 only) fan1 RPM Chassis Fan fan2 RPM Chassis Fan fan3 RPM Chassis Fan fan4 RPM Chassis Fan VID (none) CPU VID code (selected chips only) Each temperature and voltage sensor has programmable hardware high- and low-limits; fan sensors have only a low-limit. These limits can be set using the envstat(8) utility. Due to hardware limitations, the minimum permissible value for the fan speed low-limits is 83 RPM. Temperature sensors also have Tmin, Trange, Thyst, and Ttherm sysctl(8) variables; these values are used by the fan speed controllers. Their values are in units of degC, since this is the unit which is programmed into the device registers. All members of the dbCool family support Pulse-Width Modulated (PWM) fan speed control based on temperature thresholds - the fan will spin up when its associated thermal sensor(s) exceeds its configured Tmin value. The fan will go faster as the temperature rises, and will slow down as the temperature falls. If the temperature exceeds the sensor's Ttherm value, the THERM signal will be asserted, and if enabled the fan will run at full speed. The fan will be turned off when the sensor(s) that triggered it reports a temperature which is at least Thyst degrees below its Tmin threshold. Each fan controller is programmable using the following sysctl(8) variables. hw.dbcool0.fan_ctl_0.behavior hw.dbcool0.fan_ctl_0.min_duty hw.dbcool0.fan_ctl_0.max_duty hw.dbcool0.fan_ctl_0.cur_duty The behavior variable controls the selection of temperature sensors associated with the fan controller. When the associated temperature sen- sor reaches its Tmin value, the fan controller starts the fan at its minimum duty cycle; when the associated temperature sensor reaches its Ttherm value and asserts the THERM signal (or if an external THERM signal is asserted), the fan controller sets the fan speed to a 100% duty cycle. Between these two settings, each temperature sensor is used to calculate a duty cycle linearly based on the slope defined by the tem- perature sensor's range variable. When the associated temperature falls at least Thyst degress below its Tmin value, the fan controller will turn off the fan. (On the ADM1030, the value for Thyst is fixed at 5 degC.) Valid values for the behavior variable are: local (not available on ADM1030) remote1 remote2 (not available on ADM1030) local+remote2 (not available on ADM1030) all-temps full-speed (not available on ADM1030) manual disabled When the behavior variable is set to ``manual'', the cur-duty variable becomes user-writable and can be set to any value between 0 and 100 inclusive to control the fan's duty cycle manually. In all other behavior modes, the cur-duty variable is read-only and updates are ignored. The min-duty and max-duty variables define the range over which the fan controller will manage the fan's duty cycle. On the ADM1030, these values are not separately controllable. The max-duty is fixed at 100%, and the cur-duty variable is used to specify the minimum duty cycle when the fan controller is running in automatic mode. Note that the duty-cycle value does not directly correspond to the fan's speed. That is, a 33% duty cycle does not mean that the fan runs at 33% of its maximum speed; in actuality, a 33% duty cycle drives the fan at a speed close to 50% of its maximum. Fan speed correlates approx- imately to the square root of the duty cycle. EXAMPLES
The envstat(8) utility can be used to determine the sensors supported: Current CritMax WarnMax WarnMin CritMin Unit l_temp: 44.250 degC r1_temp: 41.250 degC r2_temp: N/A Vccp: 0.002 V Vcc: 3.351 V fan1: N/A fan2: N/A fan3: N/A fan4: N/A Using this information, the following commands in /etc/envsys.conf will set appropriate limits for CPU temperature and chip supply voltage, and powerd will be notified if the limits are exceeded: dbcool0 { sensor1 { warning-max = 60C; critical-max = 65C; } sensor4 { critical-min = 3.1; warning-min = 3.2; critical-max = 3.5; } } SEE ALSO
envsys(4), iic(4), envstat(8), powerd(8), sysctl(8) HISTORY
The dbcool device appeared in NetBSD 5.0. BUGS
Although the sensor limit registers can be programmed, there is currently no use of the dbCool chips' ability to generate an SMBus interrupt when the limits are exceeded. Limit checking and event generation are done in software, and are performed only when the sensor values are polled and refreshed. The ADT7466 chip, although officially a member of the dbCool family, is programmed quite differently. The fan controllers on this chip are not currently implemented. The PECI (Processor Environment Control Interface) temperature sensors and the associated PWM behavior modes on the ADT7490 are not currently supported. BSD
March 12, 2011 BSD
All times are GMT -4. The time now is 07:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy