Sponsored Content
Top Forums Shell Programming and Scripting How to write a daemon in Unix? Post 302186831 by kpit on Friday 18th of April 2008 08:15:54 AM
Old 04-18-2008
time intervals for the script

Hi all,Matrix,Glenn
can you help me in setting a script which checks for a file within every 10 mins,...script should have time intervals in between
below code checks the file but gives an error msg cant find file & then again prints the output found file

Code:
while true; do
if [[ -e file001.txt ]]; then
# Found the file; do stuff here
print "found file!"
break # stop the loop
fi
done


Last edited by Yogesh Sawant; 04-21-2008 at 05:35 AM.. Reason: added code tags
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Should a UNIX daemon process close open fds?

I have a UNIX daemon process that's been started by a parent process, an application server. The behavior of this daemon process is to inherit and use the app server's file descriptors (ports/sockets). When I shutdown the app server, the daemon continues to run, because there may be other... (1 Reply)
Discussion started by: kunalashar
1 Replies

2. Programming

How to write daemon?

Hi , I want to know how to write a daemon process. I also want to know the concept behind daemon processes. Any material or sample program will be great :) . Thanks in advance -sg (2 Replies)
Discussion started by: sg6876
2 Replies

3. UNIX for Dummies Questions & Answers

I would like to know Would you run the ‘identd’ daemon on UNIX servers?

Would you run the ‘identd' daemon on UNIX servers? can you please Explain. thanks in advance! (3 Replies)
Discussion started by: xoxouu
3 Replies

4. Shell Programming and Scripting

créating a daemon under unix

hi i want to create a daemon under unix or linux but i don't really know how so i will be grateful if you provide me links with examples or /andx how to do it thanks (2 Replies)
Discussion started by: student00
2 Replies

5. UNIX for Dummies Questions & Answers

How to write Pro*C daemon process using multithreading?

Hello, I am new to this forum and this is my first post here... I have never worked on either Pro*C or Multithreading..Now, i have to write a Pro*C, Multithreading daemon process.. I dont know where to start.. Can anybody help me with examples? 1. need to write a Pro*C multithreading... (0 Replies)
Discussion started by: kachiraju
0 Replies

6. Shell Programming and Scripting

How to write daemon in UNIX

Hi Guys, I hope this is the right forum to post this. I have a directory where files will be dumped at any time of the day and I want to run scripts as soon as new files come into the directory. How can I write a daemon that detects when new files have been uploaded to the directory? ... (1 Reply)
Discussion started by: regie101
1 Replies

7. Shell Programming and Scripting

Need to write a script to reformat a file in unix but not familiar with unix

unix script must do the fiollowing open a file containing comma delimited records > each record contains 10 fields > removes the 2nd field and use that same field containing fields 2 to 10 the original record after fprocessing should containing fields 1 and 3 a new erecord must be... (10 Replies)
Discussion started by: dwightja
10 Replies

8. Shell Programming and Scripting

Setting up a Daemon in UNIX

I have scheduled a crontab job in AIX 6.1 OS to run twice in an hour which runs for the whole day to process a load. The load which crontab kicks off needs files to arrive at a particular directory and if the files arrive, I process them. It so happens that for the 24 times the crontab... (2 Replies)
Discussion started by: gaugeta
2 Replies

9. UNIX for Beginners Questions & Answers

How to write a daemon script?

My requirement is to run two scripts simultaneously. Let say, script1.ksh is running in a loop : example: script1.ksh is: for i in 1 2 3 do script2.ksh 1 & #psedu code which is required to write here # if script 2.ksh is running, execute a script3.ksh (which actually check the... (2 Replies)
Discussion started by: sumitc
2 Replies
Locale::Script(3perl)					 Perl Programmers Reference Guide				     Locale::Script(3perl)

NAME
Locale::Script - standard codes for script identification SYNOPSIS
use Locale::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. The ones currently supported are: alpha This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_ALPHA". The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. numeric This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_NUMERIC". ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Script::delete_script ( CODE [,CODESET] ) Locale::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Script::delete_script_alias ( NAME ) Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes man page. SEE ALSO
Locale::Codes Locale::Constants http://www.unicode.org/iso15924/ Home page for ISO 15924. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2011 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-26 Locale::Script(3perl)
All times are GMT -4. The time now is 12:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy