need to invoke a script upon arrival of a file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need to invoke a script upon arrival of a file
# 1  
Old 12-24-2008
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 do not know how to make the script run every day ... i cannot set a cron-job because of limited rights...

i want to invoke the script as soon as the file arrives ... is there a way to do it ?
# 2  
Old 12-24-2008
I'd try either of the following:

1. create a cron job as user (not as root) - or -
2. create a script "running in circles" forever ...

Code:
while (true)
do
  # check folder
  # process file
  sleep # [time]
done

# 3  
Old 12-26-2008
thanks a lot dr.house
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Depend on Script message needs to be invoke anothe script

I have script below #! /bin/bash if then echo "JBoss is NOT running" else echo "JBoss is running" fi If JBoss is NOT running need to be invoke another script i.e jboss startup script /home/vizion/Desktop/jboss-4.2.3.GA/bin/run.sh script from other script not... (5 Replies)
Discussion started by: Chenchireddy
5 Replies

2. 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

3. 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

4. Emergency UNIX and Linux Support

invoke one script based on previous script execution

I am database guy and not very good at shell scripts. I am seeking help to sharp my script coding. I have 5 scripts 1. master script. I use this one to call other four scripts to do database work. 2. db_backup_1 and log_backup_1 3. db_backup_2 and log_backup_2 in master script, I want to... (4 Replies)
Discussion started by: duke0001
4 Replies

5. Shell Programming and Scripting

shell script to get the arrival count of file

Hello All, I have come across a small problem. It would be great if any of you could help me in resolving the issue. one file named dummy.txt will be ftped to Unix machine twice daily. If i receive it second time in a day i need to do some processing with the file. How to find the... (2 Replies)
Discussion started by: RSC1985
2 Replies

6. Shell Programming and Scripting

Not able to invoke a sh script from KSH

Hi all, Iam writing a KSH script which needs to export dispaly to Xwindows and then involke a sh script .. But a core file is getting genrated for reasons not known to me. Please check i need incorporate below mentioend code in my script which iam not abel to .. export DISPLAY=`who am i |... (1 Reply)
Discussion started by: rahman_riyaz
1 Replies

7. UNIX for Dummies Questions & Answers

need to invoke a shell script from xml file.

hi all, forgive me if this question is not relevant to this section. i have a shell file that will automatically deploy the files that are necessary and will compile them. i need to automate this management process through cruise control, for this i need to know whether it is possible for me to... (2 Replies)
Discussion started by: sais
2 Replies

8. Shell Programming and Scripting

invoke same script twice

hey, can I invoke the same script twice simultaneously? I want both instances to run at the same time with different parameters. Thanks! (2 Replies)
Discussion started by: mpang_
2 Replies

9. Shell Programming and Scripting

how to invoke shell script

hi everybody, i learning unix now only.Can u pls guide me in invoking a shell script.Actually i need to know how to write the command for invoking the shell script.Suppose the shell file name is count , then how i will write the command. thanks (1 Reply)
Discussion started by: gopa_mani
1 Replies

10. 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
Login or Register to Ask a Question