Sponsored Content
Full Discussion: Watcher Script
Top Forums UNIX for Dummies Questions & Answers Watcher Script Post 302584129 by rymnd_12345 on Thursday 22nd of December 2011 08:51:42 AM
Old 12-22-2011
Watcher Script

Hi Guys,

I hope anyone can help me on how to create a watcher-script. The script will act as watcher wherein whenever it will find an error (say the word Error) in a file, it will prompt the user.

Please help!


br,
rymnd_12345
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File Watcher

Hi Please help me in this I want to execute a shell script abc.ksh. But I only want it to execute if file XYZ is not present. If file XYZ is present than I want to unix to sleep for 5 Sec and than agaian check for XYX existence. if it sleeps for more than 30 seconds ( 6 time )I want it to... (3 Replies)
Discussion started by: er_zeeshan05
3 Replies

2. UNIX for Advanced & Expert Users

Need Script for File Watcher

Hi, I need a script for "FILE WATCHER" I have in a remote FTP location server named MAIN _104 EveryDay mrng 8 i hav to search couple of folders(COL, ATT, TRA) in that FTP server (MAIN_104), and if any files are present in that folders i hav to bring back to my computer and store it anywhere... (4 Replies)
Discussion started by: nani1984
4 Replies

3. Shell Programming and Scripting

File Watcher Help !!

Hi Experts I will have be having 3 types of files in directory file1_p0_date file1_p1_date file1_p2_date As soon as it sees any of the files it needs to kick off another process and also would need the file name For this I am creating a file watcher script which will look for file1* My... (2 Replies)
Discussion started by: westernmichnov
2 Replies

4. Shell Programming and Scripting

Help needed with File Watcher script

Hi all, I am writing a script to do the following: 1) Check if there are any new <csv> files (in abc directory) to process 2) If there is new file, then perform some operation on that file. 3) Move it to a different location(after step2 is successful) 4) Do further processing on the file ... (2 Replies)
Discussion started by: stunnerz_84
2 Replies

5. UNIX for Dummies Questions & Answers

Autosys file watcher

Hi friends, Instead of creating a script autosys 11.3 has a feature for filewatcher. Can anyone please share a link where ican create a file watcher job (more like manual). i need to create a filewatcher job where the job should search for a file for every 5 mins and send a mail whether the... (1 Reply)
Discussion started by: robertbrown624
1 Replies

6. Shell Programming and Scripting

Looking out for the file-watcher

Hi friends, I do not have much thoughts so need any help on the below issue: I need to create shell script that will find the files & throw an error through job (autosys) when file not found. Daily we use to receive 3 files from a system. Obstacles: 1) All 3 files names are same. 2)... (4 Replies)
Discussion started by: tush
4 Replies

7. Shell Programming and Scripting

File watcher script

if test -n "$(find/data/path/ 'filename.txst' -print-quit) then echo "file found" exit 0 else echo "file not found" exit 46 fi So I basically looking to understand the if test -n "$(find/data/path/ 'filename.txst' -print-quit) line. Pls help to elaborate what this command... (6 Replies)
Discussion started by: Nsharma3006
6 Replies

8. Shell Programming and Scripting

Required help on a Generic File-watcher script

Hi All, Good morning... I have prepared a shell script which will monitor files in a certain folder and if available, SCP it to a destination path. Now the challenge I'm facing is my script is currently SCP-ing to only a single destination path. Wherever different destination path is in... (1 Reply)
Discussion started by: saps19
1 Replies
Event::generic(3pm)					User Contributed Perl Documentation				       Event::generic(3pm)

NAME
Event::generic - generic event handling SYNOPSIS
use Event::generic; $source = Event::generic::Source->new; $w = Event->generic(source => $source, ...); $w = $source->watch(...); $source = $w->source; $w->source($source); $source->event; $source->event($data); $data = $event->data; DESCRIPTION
This module provides a watcher type within the "Event" framework. You must understand the architecture of the "Event" system in order to understand this document. This module provides a system of reified event sources and watchers watching those sources. Events are generated solely by a method on the event source object. The events may carry arbitrary data to the event handler callbacks. This module is intended for situations where the events of interest are best determined by Perl code. CLASSES
Event::generic::Source A reified event source. Event::generic A watcher that can watch "Event::generic::Source" event sources. Event::Event::Dataful A (target) event that can carry arbitrary data. EVENT SOURCE CLASS
Constructor Event::generic::Source->new Creates and returns a new event source. Methods $source->event $source->event(DATA) The invocation of this method is a source event for watchers of the event source. When this method is called, each active watcher of the event source generates a target event. The DATA, if supplied, is copied into the target event objects, from which it can be retrieved using the "data()" method. $source->watch(ATTR => VALUE, ...) Generates and returns a new watcher, configured to watch this event source. The standard watcher attributes may be specified as arguments. The watcher returned is an ordinary "Event::generic", and may be reconfigured to watch a different event source. WATCHER CLASS
Type-specific attributes source => $source The event source to watch. This must be either an "Event::generic::Source" object or "undef". When set to "undef", no source is being watched, and the watcher cannot be started. EVENT CLASS
Type-specific methods $event->data Returns the data associated with the event, which may be any scalar. This is read-only, and is set by the event source. SEE ALSO
Event perl v5.14.2 2007-05-22 Event::generic(3pm)
All times are GMT -4. The time now is 05:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy