Sponsored Content
Full Discussion: Loop check
Top Forums Shell Programming and Scripting Loop check Post 302335076 by quintet on Friday 17th of July 2009 07:35:47 AM
Old 07-17-2009
r_t_1601, I couldnt understand your requirement. You want a while loop to poll in a directory to check if the folder has more than 4 files and if yes the loop.

Isnt my code doing that?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

looking for help with a dd loop check script

Hi Can anyone please help with the following script I need - .ksh preferably? I have external disks attached to a system that I have to label and then run the dd command on all external disk found. I have kicked off the dd command as follows manually to see what its output is like first... (1 Reply)
Discussion started by: angusyoung
1 Replies

2. Shell Programming and Scripting

Loop to check for file up to 3 times

Please forgive this I think rather basic question. I have been away from UNIX for a very long time and am in need of some help. I need to be able to check for the existance of a specific file name say 'file.dat' in a particular location If the file exists then run a second process (at... (2 Replies)
Discussion started by: JohnCrump
2 Replies

3. Shell Programming and Scripting

Check for statup process in loop?

I've written a script to check for Oracle's listener, eventman and pmon processes however there are several databases that startup which can take several minutes. I'd like to add code to my current script that greps for the process “startup” and whether its condition is true or false. If the... (1 Reply)
Discussion started by: dataciph3r
1 Replies

4. Shell Programming and Scripting

loop and check

Hi, We are doing a process manually and i am trying to automate it. This is the process. We have a set of files in the directory /temp/d1. the number of files are dynamic. For ex: if i have 5 files i want to compare the chatacters 45-58 of the last line of the first file with the same... (2 Replies)
Discussion started by: dnat
2 Replies

5. Shell Programming and Scripting

WHILE LOOP CONDITION CHECK

Hello I want to compare values of two variables as CHECK condition in a while loop. eg: var1=0 var2=10 while do echo " $var1 " var1=`expr $var1 + 1` done However this is giving error.How to do it in a proper manner? Thanks. (3 Replies)
Discussion started by: dashing201
3 Replies

6. Shell Programming and Scripting

Check condition inside the loop

Hi, I am in trouble. I can get inside my condition test inside a loop : I am in ksh (solaris) while read file do <commande to retrieve file> >> ${LOG_RETRIEVE_FILE.log} msg_err=$(cat ${LOG_RETRIEVE_FILE.log} | grep "error retrieve") if ; then <sendmail> exit 1 fi done I tried... (6 Replies)
Discussion started by: Aswex
6 Replies

7. UNIX for Dummies Questions & Answers

For loop to check the files availability

Hi, I need a help with my script. Below is my script. What I am doing here is finding the date of the file which I need to process and then finding the list of file names. Based on the list of file names, check has to be done to see if all the files are there and log the details to a error... (3 Replies)
Discussion started by: Vijay81
3 Replies

8. Shell Programming and Scripting

IF loop to check the time modified

Hi Frnds, i have a folder test in which files generated daily how to chek the files that are modified on that day as a condition for ex, if then echo "i have got something to do with the file" else echo" sorry" fi i will have more than 3 to 4 files that are modified today. and if... (5 Replies)
Discussion started by: mahesh300182
5 Replies

9. Shell Programming and Scripting

While Loop to Check for Integer

Hello All, In ksh I am trying to ensure that user inputs are integers otherwise redisplay prompt with the following code; a=0 b=0 c=0 read b?"Please enter a number: " read c?"Please enter another number: " while ] && ]; do read b?"Not a number. Please enter a number: " read c?"Not... (4 Replies)
Discussion started by: techieg
4 Replies

10. Shell Programming and Scripting

Check two condition in while loop

Hi, I Have to check two condition in while loop every 2 minutes. while loop is accompanied with number of times it will check.Please help in putting the two condition in while loop as appropriate. z= input value, A=1 while do 1.check the file output,if the file output is N then keep on... (2 Replies)
Discussion started by: netdbaind
2 Replies
IO::Async::Loop::Poll(3pm)				User Contributed Perl Documentation				IO::Async::Loop::Poll(3pm)

NAME
"IO::Async::Loop::Poll" - use "IO::Async" with "poll(2)" SYNOPSIS
Normally an instance of this class would not be directly constructed by a program. It may however, be useful for runinng IO::Async with an existing program already using an "IO::Poll" object. use IO::Poll; use IO::Async::Loop::Poll; my $poll = IO::Poll->new; my $loop = IO::Async::Loop::Poll->new( poll => $poll ); $loop->add( ... ); while(1) { my $timeout = ... my $ret = $poll->poll( $timeout ); $loop->post_poll; } DESCRIPTION
This subclass of "IO::Async::Loop" uses an "IO::Poll" object to perform read-ready and write-ready tests. To integrate with existing code that uses an "IO::Poll", a "post_poll" can be called immediately after the "poll" method on the contained "IO::Poll" object. The appropriate mask bits are maintained on the "IO::Poll" object when notifiers are added or removed from the set, or when they change their "want_writeready" status. The "post_poll" method inspects the result bits and invokes the "on_read_ready" or "on_write_ready" methods on the notifiers. CONSTRUCTOR
$loop = IO::Async::Loop::Poll->new( %args ) This function returns a new instance of a "IO::Async::Loop::Poll" object. It takes the following named arguments: "poll" The "IO::Poll" object to use for notification. Optional; if a value is not given, a new "IO::Poll" object will be constructed. METHODS
$count = $loop->post_poll( $poll ) This method checks the returned event list from a "IO::Poll::poll" call, and calls any of the notification methods or callbacks that are appropriate. It returns the total number of callbacks that were invoked; that is, the total number of "on_read_ready" and "on_write_ready" callbacks for "watch_io", and "watch_time" event callbacks. $poll Reference to the "IO::Poll" object $count = $loop->loop_once( $timeout ) This method calls the "poll" method on the stored "IO::Poll" object, passing in the value of $timeout, and then runs the "post_poll" method on itself. It returns the total number of callbacks invoked by the "post_poll" method, or "undef" if the underlying "poll" method returned an error. AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2012-10-24 IO::Async::Loop::Poll(3pm)
All times are GMT -4. The time now is 03:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy