Hi Friends,
Need help regarding counting the word "friend" in files test1.txt and test2.txt. ( there is no gap/space between word )
ouput is:
total number of occurance of friend is: 6
i tried writing a shell script, but it is not working when there is no gap.
Below is the code
how to count the total number of lines of all the files under a directory using perl script..
I mean if I have 10 files under a directory then I want to count the total number of lines of all the 10 files contain. Please help me in writing a perl script on this. (5 Replies)
Please advice how can we search for a string say (abc) in multiple files and to get total occurrence of that searched string. (Need number of records that exits in period of time).
File look like this (read as filename.yyyymmdd)
a.20100101
b.20100108
c.20100115
d.20100122
e.20100129... (2 Replies)
Hi, been searching Google for like an hour and I doubt I got the right keywords so might as well ask here.
What I need:
Before:
Article1.txt 564
Article2.txt 799
Article3.txt 349
Article4.txt 452
* Separate files over 400 wordcount *
After:
Article1.txt 564... (3 Replies)
i want to find the no:of occurrences of a word in a file
cat 1.txt
unix script unix script
unix script unix script unix script unix script
unix script unix script unix
unix
script
unix script unix script now i want to find , how many times 'unix' was occurred
please help me
thanks... (6 Replies)
My files:
file1 and file2 contain 157 words.
Emptyfile1 contain 0 words.
My script has to output how many files is filled with words and how many that are not.
If there are files that have words in it. It has to output "file2 and file2 contains 157 words, 0 files are empty"
If not every... (9 Replies)
Hi All ,
I have multiple pipe delimited csv files are present in a directory.I need to find out distinct count on a column on those files and need the total distinct
count on all files.
We can't merge all the files here as file size are huge in millions.I have tried in below way for each... (9 Replies)
Discussion started by: STCET22
9 Replies
LEARN ABOUT CENTOS
wdmd
WDMD(8) System Manager's Manual WDMD(8)NAME
wdmd - watchdog multiplexing daemon
SYNOPSIS
wdmd [OPTIONS]
DESCRIPTION
This daemon opens /dev/watchdog and allows multiple independent sources to detmermine whether each KEEPALIVE is done. Every test interval
(10 seconds), the daemon tests each source. If any test fails, the KEEPALIVE is not done. In a standard configuration, the watchdog timer
will reset the system if no KEEPALIVE is done for 60 seconds ("fire timeout"). This means that if a single test fails 5-6 times in row,
the watchdog will fire and reset the system. With multiple test sources, fewer separate failures back to back can also cause a reset, e.g.
T seconds, P pass, F fail
T00: test1 P, test2 P, test3 P: KEEPALIVE done
T10: test1 F, test2 F, test3 P: KEEPALIVE skipped
T20: test1 F, test2 P, test3 P: KEEPALIVE skipped
T30: test1 P, test2 F, test3 P: KEEPALIVE skipped
T40: test1 P, test2 P, test3 F: KEEPALIVE skipped
T50: test1 F, test2 F, test3 P: KEEPALIVE skipped
T60: test1 P, test2 F, test3 P: KEEPALIVE skipped
T60: watchdog fires, system resets
(Depending on timings, the system may be reset sometime shortly before T60, and the tests at T60 would not be run.)
A crucial aspect to the design and function of wdmd is that if any single source does not pass tests for the fire timeout, the watchdog is
guaranteed to fire, regardless of whether other sources on the system have passed or failed. A spurious reset due to the combined effects
of multiple failing tests as shown above, is an accepted side effect.
The wdmd init script will load the softdog module if no other watchdog module has been loaded.
wdmd cannot be used on the system with any other program that needs to open /dev/watchdog, e.g. watchdog(8).
Test Source: clients
Using libwdmd, programs connect to wdmd via a unix socket, and send regular messages to wdmd to update an expiry time for their connection.
Every test interval, wdmd will check if the expiry time for a connection has been reached. If so, the test for that client fails.
Test Source: scripts
wdmd will run scripts from a designated directory every test interval. If a script exits with 0, the test is considered a success, other-
wise a failure. If a script does not exit by the end of the test interval, it is considered a failure.
OPTIONS --version, -V
Print version.
--help, -h
Print usage.
--dump, -d
Print debug information from the daemon.
--probe, -p
Print path of functional watchdog device. Exit code 0 indicates a
functional device was found. Exit code 1 indicates a functional device
was not found.
-D
Enable debugging to stderr and don't fork.
-H 0|1
Enable (1) or disable (0) high priority features such as realtime
scheduling priority and mlockall.
-G name
Group ownership for the socket.
-S 0|1
Enable (1) or disable (0) script tests.
-s path
Path to scripts dir.
-k num
Kill unfinished scripts after num seconds.
-w path
The path to the watchdog device to try first.
2011-08-01 WDMD(8)