Hi all,
I've been working on a script which I have hit a road block now. I have written a script using sed to extract the below data and pumped into another file:
Severity............: MAJORWARNING
Summary:
System temperature is out of normal range.
Severity............: MAJORWARNING... (13 Replies)
Hi ,
I'm looking for a way to merge two lines only for a given pattern / condition.
Input :
abcd/dad + -49.201 2.09 -49.5 34 ewrew rewtre *
fdsgfds/dsgf/sdfdsfasdd +
-4.30 0.62 -49.5 45 sdfdsf cvbbv *
sdfds/retret/asdsaddsa +
... (1 Reply)
Data:
Pattern Data Data Data
Data Data Data
Data Data Data
...
With awk, how do I print the pattern matching line, then the subsequent lines following the pattern matching line. Varying number of lines following the pattern matching line. (9 Replies)
Ive used this snippet of code on a solaris box thousands of times.
But it isnt working on the new linux box
sed -n '/interface LoopBack0/{N;/ ip address /p;}' *.conf
its driving me nuts !!
Is there something Im missing ? (7 Replies)
I know how to search for a pattern/regular expression in many files that I have in a directory. For example, by doing this:
grep -Ril "News/U.S." .
I can find which files contain the pattern "News/U.S." in a directory.
I am unable to accomplish about how to extend this code so that it can... (1 Reply)
Hi,
I would like to know how to remove lines which has the same pattern as the next line through sed/awk.
Stream 39 (wan stream 7)
Stream 40 (wan stream 8)
WINQ Counter 115955 1 1613
(BYTE) 11204787 163 ... (2 Replies)
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
I have a text file with many thousands of lines, a small sample of which looks like this:
InputFile:PS002,003 D -1 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 6 -1 -1 -1 -1 0 509 0
PS002,003 PSQ 0 1 7 18 1 0 -1 1 1 3 -1 -1 ... (5 Replies)
Discussion started by: jvoot
5 Replies
LEARN ABOUT DEBIAN
battery-stats
BATTERY-STATS(5) File Formats Manual BATTERY-STATS(5)NAME
battery-stats - collected battery statistics
DESCRIPTION
The battery-stats contains statistics about battery charge over time, as collected by the battery-stats-collector (8) daemon.
FORMAT
Each line in the file represents one sample and is of the form:
<seconds> <charge%> <powermode> <UTC-date> <UTC-time>
separated by spaces and terminated by a newline.
Where:
seconds
is the number of seconds since 1st Jan 1970 00:00:00 UTC
charge%
is the battery charge a number between 0 and 100
powermode
indicates the power mode:
0 A/C off
1 On battery
2 On backup power
UTC-date
a human-readable date in the format YYYY/MM/DD. Note that this is in UTC, not the local or system timezone.
UTC-time
a human-readable time in the format HH:MM:SS (using a 24-hour clock). Note that this is in UTC, not the local or system timezone.
minutes-left
is the BIOS estimate of how many minutes of running time the battery would provide. This may be unreliable, depending on the BIOS
through which it was collected.
EXAMPLE
A battery under charge might result in the following samples:
1032651245 27 1 2002/09/21 23:34:05 94
1032651275 28 1 2002/09/21 23:34:35 97
1032651305 29 1 2002/09/21 23:35:05 100
1032651335 30 1 2002/09/21 23:35:35 103
1032651365 30 1 2002/09/21 23:36:05 106
FILES
The default set-up is to save battery statistics in /var/log and rotate the logs weekly, which results in this set of files:
/var/log/battery-stats - current (most recent) statistics
/var/log/battery-stats.[0-9]+ - less recent statistics
/var/log/battery-stats.[0-9]+.gz - ancient statistics
SEE ALSO battery-graph(1), battery-stats-collector(8).
AUTHOR
Karl E. Jorgensen <karl@jorgensen.com>
September 23, 2002 BATTERY-STATS(5)