Sponsored Content
Top Forums Shell Programming and Scripting shell script to get the arrival count of file Post 302345718 by dr.house on Thursday 20th of August 2009 04:49:22 AM
Old 08-20-2009
Ad hoc (assumed you'll remove the processed file),

- you may want to create and schedule (cron) a script, which
- on a regular base checks for the file in question ('if -f file'),
- stores it's details ('ls -l file') to a status file ('> status_one'),
- if status_one exists, compares the current file's details to those stored,
- if different, processes the current file and finally removes the status file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File arrival status

If there is a file being transferred from one box to another box, How can one confirm on the 2nd box..that the file has arrived, and transfer is complete ? I mean in addition to checking the file exists, I want to confirm its transferred completely and not growing in size. (4 Replies)
Discussion started by: amsh76
4 Replies

2. Shell Programming and Scripting

need to invoke a script upon arrival of a file

hi all, i recieve a file from other server, on a daily basis .... but the time of arrival is unpredictable .... i need to move this file to another directory before the next file arrives ... i have written a script that does this op and performs some manipulations on the data... but i... (2 Replies)
Discussion started by: sais
2 Replies

3. Shell Programming and Scripting

count multiple objects in shell script

Hi all: Trying to count the number of oracle instances on HPUX 11.23 - using ksh. I have multiple instances running and I would like to have a count for how many processes for each instance. Example, run the 'ps -efu oracle' command and for each instance increment a counter. So I am looking for... (4 Replies)
Discussion started by: raggmopp
4 Replies

4. Shell Programming and Scripting

Hit count on a shell script

I have a unix shell script (ex.sh) written. How to find out how many users (incl. myself) have run this .sh ? I can insert code snipet at top of script if need be. - Ravi (2 Replies)
Discussion started by: ravi368
2 Replies

5. Shell Programming and Scripting

Need File arrival time(sftp) command

Hi All, I am getting some file through using sftp from another server to my server. I want know the exact file arrival time on my sytem I have tried stat command . it gives me the below details $ stat abc.txt File: `abc.txt Size: 24231 Blocks: 48 IO Block:... (5 Replies)
Discussion started by: aish11
5 Replies

6. Shell Programming and Scripting

Print record count of a file using shell script

HI, I need to print the record count of a file using shell script. If the record count of a file excluding header and trailer record if greater than zero then print 'Record count of a file is xxxx records'. If the record count is zero print 'zero records' Thanks Mahendra (1 Reply)
Discussion started by: mmeda
1 Replies

7. Shell Programming and Scripting

Validate file count in korn shell script

Hi, I have files in the directory like below which I need to validate if all the required files are present. A_B_001 of 002_time1.txt A_B_002 of 002_time1.txt A_B_001 of 001_time2.txt Scenarios- a)If file with 001 of 002_time1 or 002 of 002_time1 is missing in the folder,script should... (6 Replies)
Discussion started by: aneeta13
6 Replies

8. UNIX for Dummies Questions & Answers

Script shell calculate mean arrival request duration

hello, I have implemented this command : tshark -eth0 -T fiels -e frame.time et sip.Request-Line -z sip,stat > test2.txt the result of this command : test.txt: Aug 27, 2013 23:06:47.334270000 INVITE Aug 27, 2013 23:06:47.335045000 SIP/2.0 401 Unauthorized Aug 27, 2013... (1 Reply)
Discussion started by: Amouna
1 Replies

9. Shell Programming and Scripting

File Count Based on FileDate using Shell Script

I have file listed in my directory in following format -rwxrwxr-x+ 1 test test 4.9M Oct 3 16:06 test20141002150108.txt -rwxrwxr-x+ 1 test test 4.9M Oct 4 16:06 test20141003150108.txt -rwxrwxr-x+ 1 test test 4.9M Oct 5 16:06 test20141005150108.txt -rwxrwxr-x+ 1 test ... (2 Replies)
Discussion started by: krish2014
2 Replies

10. Shell Programming and Scripting

Script Shell: Count The sum of numbers in a file

Hi all; Here is my file: V1.3=4 V1.4=5 V1.1=3 V1.2=6 V1.3=6 Please, can you help me to write a script shell that counts the sum of values in my file (4+5+3+6+6) ? Thank you so much for help. Kind regards. (3 Replies)
Discussion started by: chercheur111
3 Replies
QER(8)							      System Manager's Manual							    QER(8)

NAME
qer, runq - queues management for spooled files SYNOPSIS
qer root tag reply args runq [ -ad ] root cmd DESCRIPTION
Qer creates a control and a data file in a queue directory. The control file contents consist of the tag, reply, and args separated by spaces. The data file contains the standard input to qer. The files are created in the directory root/user, where user is the contents of /dev/user. Mktemp(2) is used to create the actual names of the control and data file. Runq processes the files queued by qer. Without the -a option, runq processes all requests in the directory root/user, where user is the contents of /dev/user. With the -a it processes all requests. Each request is processed by executing the command cmd with the contents of the control file as its arguments, the contents of the data file as its standard input, and standard error appended to the error file E.XXXXXX. The action taken by runq depends on the return status of cmd. If cmd returns a null status, the processing is assumed successful and the control, data, and error files are removed. If cmd returns an error status containing the word the files are left to be reprocessed at a later time. For any other status, an error message is mailed to the requester and the files are removed. Runq uses the reply field in the control file as a mail address to which to send an error notification. The notification contains the contents of the control file to iden- tify the failed request. To avoid reprocessing files too often, the following algorithm is used: a data file younger than one hour will not be processed if its error file exists and was last modified within the preceding 10 minutes. A data file older than one hour will not be processed if its error file exists and was last modified within the preceding hour. The -d option causes debugging output on standard error describing the progress through the queues. Runq is often called from cron(8) by an entry such as 0,10,20,30,40,50 * * * * kremvax runq -a /mail/queue /mail/lib/remotemail The entry must be a single line; it is folded here only so it fits on the page. FILES
root/user queue directory for user root/user/D.XXXXXX data file root/user/C.XXXXXX control file root/user/E.XXXXXX error file SOURCE
/sys/src/cmd/upas/q SEE ALSO
mail(1) QER(8)
All times are GMT -4. The time now is 01:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy