Sponsored Content
Full Discussion: File existence and increment
Top Forums Shell Programming and Scripting File existence and increment Post 302442075 by ultimatix on Tuesday 3rd of August 2010 08:21:20 AM
Old 08-03-2010
Bug

hi .. got ur point but how do i implement that ... any suggestions
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File existence

Hey all, I have total new with shell scripting so I don't know if what I need to do even possible, here it is...for a duration of time (say...1 hour) I need to check for the existence of a particular file, if it exists then I will invoke a java program or I will continue to check until a)... (2 Replies)
Discussion started by: mpang_
2 Replies

2. UNIX for Dummies Questions & Answers

File existence problem

I have a problem with file existence in shell. that is the code.. #!/bin/sh if then echo "File Exist!!" else echo "Error" fi but it gives an error in 2nd line. Did i write example.txt wrong? Is there any (`) or (") missing? or something like that? (2 Replies)
Discussion started by: anormal
2 Replies

3. Shell Programming and Scripting

Checking the existence of a file..

Hi, I am trying to check for the existence of a file using the 'test' and the file existence options. When trying to check for a file with a space in between e.g 'Team List', it gives the following error. learn1: line 3: test: `Team: binary operator expected I am pasting my code below as... (7 Replies)
Discussion started by: igandu
7 Replies

4. Shell Programming and Scripting

File existence using ls

Hi I want to check a particular file is available or not. But i know only the pattern of that file sat AB1234*.txt.I need the latest file name and it ll be used in the script. How can i do this using ls -ltr command. Thanks, LathishSundar V (2 Replies)
Discussion started by: lathish
2 Replies

5. AIX

Check for File Existence

I have requirement where i need to search for files which start with SALESORDER and PURCHASEORDER. i need to process the files with SALESORDER first and then PURCHASEORDER. If SALESORDER files are not there i dont want to process PURCHASEORDER and i want to come out of script. I have written a code... (4 Replies)
Discussion started by: dsdev_123
4 Replies

6. Shell Programming and Scripting

Parse file from remote server to calculate count of string existence in that file

Hi I need to parse the file of same name which exist on different servers and calculate the count of string existed in both files. Say a file abc.log exist on 2 servers. I want to search for string "test" on both files and calculate the total count of search string's existence. For... (6 Replies)
Discussion started by: poweroflinux
6 Replies

7. UNIX for Dummies Questions & Answers

To check for existence of a file

I need to check for the existence of a file *.log in a specific directory using a perl script. Presently am not in that particular directory. So i am using chdir ("/path/to/my/file) And then i am using the -e in an if statement to check if it exists. if (-e $File) {......} $File contains the... (1 Reply)
Discussion started by: manutd
1 Replies

8. Shell Programming and Scripting

File existence

Hi I'm using the below command in shell script to check for file exists in the path if ..... fi path and test are variables path and the file exists but the commands inside if condition is executed (! operator used) Is the above way of checking for file existence is correct? ... (4 Replies)
Discussion started by: vinoth_kumar
4 Replies

9. Shell Programming and Scripting

Script to check for the file existence, if file exists it should echo the no of modified days

Hi, I am looking for a shell script with the following. 1. It should check whether a particular file exists in a location #!/bin/sh if ; then echo "xxx.txt File Exists" else echo "File Not Found" fi 2. If file exists, it should check for the modified date and run a command... (2 Replies)
Discussion started by: karthikeyan_mac
2 Replies

10. Shell Programming and Scripting

File existence

Hope someone can help me on this In a directory ,files are dynamically generated.I need a script to do the following if files are not received for more than 2 hours or if the received file is empty then do something How can I put that in a script.Thank you eg. in cd /dir_name the... (13 Replies)
Discussion started by: haadiya
13 Replies
register_callback(9r)													     register_callback(9r)

NAME
register_callback - General: Registers a configuration callback routine SYNOPSIS
int register_callback( void (*function) (), int point, int order, ulong argument ); ARGUMENTS
Specifies the name of the routine that you want called at a later time. Specifies the dispatch point at which the kernel calls this call- back routine. The kernel passes the value associated with this dispatch point to the kernel module's callback routine when it calls it. Specifies the order in which you want callback routines registered for the same dispatch point to be executed. The kernel passes the value associated with this order to the kernel module's callback routine when it calls it. You use this argument to control the order of execu- tion of multiple callback routine within each dispatch point. The register_callback routine executes a kernel module's callback routine for the same dispatch point in increasing numerical order of the value specified in the order argument. Specifies an argument that you want the kernel to pass to the kernel module'scallback routine when the kernel calls it. You pass the integer constant 0L to indicate that you do not want to pass an argument. DESCRIPTION
The register_callback routine registers a kernel module's callback routine. The kernel calls a kernel module's callback routine when execu- tion reaches the point specified in the point and order arguments. The kernel passes the values specified in the point and argument argu- ments to the kernel module's callback routine. Kernel modules implement one or more callback routines to handle the different dispatch points in the boot path. The dispatch point constants you can pass to the point argument are defined in the /usr/sys/include/sys/sysconfig.h file. The following ta- ble lists the dispatch point constants that kernel modules can use: The dispatch point is hardware preconfiguration. Tasks that do not require completion of hardware configuration can be performed at this dispatch point. The dispatch point is hardware postconfiguration. Tasks that require completion of hardware configuration can be performed at this dispatch point. The dispatch point is root file system available. Tasks that require completion of the root file system mount operation can be performed at this dispatch point. The order constants you can pass to the order argument are defined in the /usr/sys/include/sys/sysconfig.h file. The following table lists the order constants that kernel modules can use: This callback routine is registered at the lowest priority. Typically, you pass this con- stant with an appropriate offset. The kernel executes callback routines registered at this priority last. This callback routine is regis- tered at the highest priority. Typically, you pass this constant with an appropriate offset. The kernel executes callback routines regis- tered at this priority first. NOTES
The kernel maintains an internal callback list that stores the values you pass to the register_callback routine. These callbacks remain registered until the user removes them. Only statically configured kernel modules need to implement callback routines. Thus, only statically configured kernel modules need to call the register_callback routine. You typically call the cfgmgr_get_state routine to determine if the kernel module is in the dynamic configuration state or the static con- figuration state. RETURN VALUES
Upon successful completion, the register_callback routine returns the value ESUCCESS. Otherwise, register_callback returns one of the following error constants defined in /usr/sys/include/sys/errno.h: The system limit on the maximum number of callback requests was exceeded. To change the maximum number of callback requests, set the new value for the boot-time tunable parameter max_callbacks in the cm subsystem (located in the /etc/sysconfigtab database) and reboot the system. You can use the sysconfigdb utility to accomplish this task. The value you passed to the point argument is outside the minimum and maximum range. FILES
SEE ALSO
Kernel routines: cfgmgr_get_state(9r), unregister_callback(9r) register_callback(9r)
All times are GMT -4. The time now is 04:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy