Hi,
I have a question on bash. Basically I would like to print a file name using bash. I am actually trying to grep a particular character in sequential files.
I have alot files such that a.txt, b.txt,c.txt...etc.
If I found a certain character, I would print that particular filename.
I... (5 Replies)
Hi all,
I need help in following scenario. I have a file with about 10,000 lines. There are several lines which have word "START" (all upper case) in them. I want to grep line with word "START" and then do the following
1. Print the line number having word "START"
2. Print the next 11 lines.
... (4 Replies)
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
I just need to print value 12 digit number after the key *MI*. My big concern is the below lines are not fixed format or length so cant cut based on the position.
XSA*00**00**XZ*DA-Paper*30*942411167****MI*010001990802~AEE
XSA*00**00**ZZ*EA-aper*30*94169****MI*010001960802~SDRE*ER... (7 Replies)
Hi
I have this in my file
2011-04-18 15:32:11 system-alert-00012: UDP flood! From xxxxxx to yyyyyyyyyy, int ethernet0/2). Occurred 1 times.
2011-04-18 15:32:11 system-alert-00012: UDP flood! From xxxxxx to yyyyyyyyyy, int ethernet0/2). Occurred 1 times.
2011-04-18 15:32:11... (9 Replies)
Hi ,
I have data in below pattern
05:00:13,184 WARN ContentTransferService - CTS:createContent - File Name:470208627 Total time taken(ms):5137
05:00:13,184 WARN ContentTransferService - CTS:createContentWithFolderPath(uploadDocument) - File Name:295918481 User Id:xyz Total time... (5 Replies)
Hi,
I have a continuous log file which has the following format:-
02/Sep/2015: IP 11.151.108.166 error occurred etc
03/Sep/2015: IP 11.151.108.188 error occurred etc
03/Sep/2015: IP 11.152.178.250 error occurred etc
03/Sep/2015: IP 11.188.108.176 error occurred etc
03/Sep/2015: IP... (4 Replies)
Discussion started by: finn
4 Replies
LEARN ABOUT CENTOS
wdctl
WDCTL(8) System Administration WDCTL(8)NAME
wdctl - show hardware watchdog status
SYNOPSIS
wdctl [options] [device...]
DESCRIPTION
Show hardware watchdog status. The default device is /dev/watchdog. If more than one device is specified then the output is separated by
one blank line.
Note that number of supported watchdog features is hardware specific.
OPTIONS -f, --flags list
Print selected flags only.
-F, --noflags
Do not print information about flags.
-n, --noheadings
Do not print a header line for flags table.
-I, --noident
Do not print watchdog identity information.
-T, --notimeouts
Do not print watchdog timeouts.
-s, --settimeout seconds
Set the watchdog timeout in seconds.
-o, --output list
Define the output columns to use in table of watchdog flags. If no output arrangement is specified, then a default set is used.
Use --help to get list of all supported columns.
-O, --oneline
Print all wanted information on one line in key="value" output format.
-V, --version
Output version information and exit.
-r, --raw
Use the raw output format.
-x, --flags-only
Same as -I -T.
-h, --help
Print a help text and exit.
AUTHORS
Karel Zak <kzak@redhat.com>
Lennart Poettering <lennart@poettering.net>
AVAILABILITY
The wdctl command is part of the util-linux package and is available from Linux Kernel Archive <ftp://ftp.kernel.org/pub/linux/utils/util-
linux/>.
util-linux June 2012 WDCTL(8)