Sponsored Content
Top Forums Shell Programming and Scripting While loop in certain interval Post 302863931 by Akshay Hegde on Tuesday 15th of October 2013 12:30:48 PM
Old 10-15-2013
try

Code:
while :
do 
   
IFS=","
while read group file X
do   
   if [ -f $file ] ; then 
      time=$(ls -l $file |awk '{print $6,$7,$8}')
      echo "$group, $file, $time, YES"
   else 
      echo "$group, $file , NO"
   fi
done < list.txt

    sleep 900
    echo " 900 sec over start script again"

done

This User Gave Thanks to Akshay Hegde For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

Time Wait interval

What is the time_wait interval for Solaris 8/9??? and is it configurable??? For example sometimes a clients pc will freeze up dropping the connection, closing the port. The problem is on our side our system still thinks their logged in (until it realizes it dropped on the otherside and drops on... (1 Reply)
Discussion started by: eloquent99
1 Replies

2. Shell Programming and Scripting

Need Help for interval date

Hello, I need help about a shell script I have a text file with this fields: 2009/01/19 09:33:35: --> ---ORA-28817: PL/SQL function returned an error. 2009/01/19 09:33:35: --> ---ORA-28817: PL/SQL function returned an error. 2009/01/19 09:33:35: --> ---ORA-28817: PL/SQL function returned an... (4 Replies)
Discussion started by: giofai
4 Replies

3. OS X (Apple)

interval in a launchd script

Hi, i'm planning a to automate my backup with a rsync user deamon in my launchd and let that run every 2 hours. my server contains a lot of video data which can expand rapidly , up to 1TB, in an interval of 2 hours. now i'm wondering what will happen when a rsync is running longer then the... (1 Reply)
Discussion started by: wessel
1 Replies

4. UNIX for Advanced & Expert Users

Summation of the column value in an interval.

Hey, I have a file with following data.. and I want to get the summation of 10th column. And this happens in every 10 seconds for a minute max. 242001 A mqsitst 794864 1249516 0 60 20 293050400 77016 * 02:05:33 - 0:04 DataFlowEngine EAITIBR2_BROKER... (6 Replies)
Discussion started by: varungupta
6 Replies

5. Shell Programming and Scripting

compare the interval of 2 numbers of input2with interval of several numbers of input1

Help plz Does any one have any idea how to compare interval ranges of 2 files. finding 1-4 (1,2,3,4) of input2 in input1 of same key "a" values (5-10, 30-40, 45-60, 80-90, 100-120 ). Obviously 1-4 is not one of the range with in input1 a. so it should give out of range. finding 30-33(31,32,33)... (1 Reply)
Discussion started by: repinementer
1 Replies

6. Shell Programming and Scripting

grep searching interval

Hi all, I just want to find all values that are in a specified interval. I tryed it with grep e- file , it does not work. Is it possible to get values wich are lower a special number, like grep >e-18 file? Thanks a lot (4 Replies)
Discussion started by: newcommer
4 Replies

7. Solaris

NTP polling interval

Is it possible to change the ntp poll manually. I notice that ntp poll is changing autimatically. (1 Reply)
Discussion started by: ningy
1 Replies

8. Shell Programming and Scripting

interval based count

Hi, I have a file with 4 million rows. what i am trying to achieve is for every 1000 interval count the number of rows and display it i/p 12 200 400 750 1000 1500 1800 2200 2345 2600 2896 3020 3400 (0 Replies)
Discussion started by: Diya123
0 Replies

9. Shell Programming and Scripting

Interval merging

I do have a file (file1) with a specified interval of 500 counts file1 0 500 500 1000 1000 1500 1500 2000 2000 2500 2500 3000 3000 3500 3500 4000 4000 4500 4500 5000 5000 5500 5500 6000 6000 6500 6500 7000 7000 7500 7500 8000 (3 Replies)
Discussion started by: Kanja
3 Replies

10. UNIX for Beginners Questions & Answers

Repetition in a particular interval

Suppose I have a word which is repeating in a string continuously. I have a set of intervals. Then how do I find the number occurrences of that word in those intervals and their location of occurrences. For example - Suppose there is a huge string anfie.......sirn of 10000 letters. Now the word... (2 Replies)
Discussion started by: ANKIT ROY
2 Replies
POSIX_SETGID(3) 							 1							   POSIX_SETGID(3)

posix_setgid - Set the GID of the current process

SYNOPSIS
bool posix_setgid (int $gid) DESCRIPTION
Set the real group ID of the current process. This is a privileged function and needs appropriate privileges (usually root) on the system to be able to perform this function. The appropriate order of function calls is posix_setgid(3) first, posix_setuid(3) last. Note If the caller is a super user, this will also set the effective group id. PARAMETERS
o $gid - The group id. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 posix_setgid(3) example This example will print out the effective group id, once it is changed. <?php echo 'My real group id is '.posix_getgid(); //20 posix_setgid(40); echo 'My real group id is '.posix_getgid(); //40 echo 'My effective group id is '.posix_getegid(); //40 ?> SEE ALSO
posix_getgrgid(3), posix_getgid(3). PHP Documentation Group POSIX_SETGID(3)
All times are GMT -4. The time now is 01:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy