Sponsored Content
Top Forums Shell Programming and Scripting waiting for the files untill they loads Post 302523945 by rbatte1 on Friday 20th of May 2011 10:50:26 AM
Old 05-20-2011
It would be best if your sender could include a flag to say that they were all delivered, i.e. create a zero or one byte file called *.todays_date.complete

That way you would have the confidence that the inbound ftp had completed without error (assuming that the sender does not send the 'complete' file as a separate transfer without checking for errors) which is better than just using fuser to check if the file is open.

If you know you need 39 files and they all come from different transfers, you may have to just script up something like this:-
Code:
#!/bin/ksh
cd /stage_area/loadfiles/telsims/test

todays_date=`date +%Y_%m_%d`   # Assuming that this is the format you want
until [ `ls -1 *.${todays_date}.complete | wc -l` -eq 39 ]
do
     sleep 10
done

echo "All files arrived.  Continuing with main processing."



Does that help?



Robin
Liverpool/Blackburn
UK
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SCO CPU Loads

I've been asked to get a breakdown of what is consuming CPU time on our server over an extended period ? Have been asked about the CPU load on our server and I need to be able to go back to my boss and indicate what % is consumed by what process (or group of processes). I.e. 15% is database... (2 Replies)
Discussion started by: Cameron
2 Replies

2. Linux

Details about the way 'gcc' compiles,links and loads?

Hi all, Can any body provide me with a link that gives the core details of the three processes(given below) in concern with 'gcc'? 1)Compiling 2)Linking 3)Loading (1 Reply)
Discussion started by: me_himanshu
1 Replies

3. UNIX for Dummies Questions & Answers

Adding loads of columns

Hi All, I've got file1 like this: aaa bbb ccc ddd eee fff ggg hhh kkk ppp mmm nnn and file 2 like this: aaa qqq www ddd fff ggg ggg sss zzz ppp vvv yyy and file 3 like this: aaa ggg ppp I need to match the first column of file3 and file1, then add the rest of the file 1 to... (3 Replies)
Discussion started by: zajtat
3 Replies

4. UNIX for Advanced & Expert Users

How OS loads process in memory to execute ?

Hi, I was Googling to get info "How OS loads process into its memory to execute?" i mean when i execute ./<exename> , How OS exectes it? It will be better if i tell my intention, In my $LOGNAME saveral process are running, among all of these two process are my target process. Basically I... (1 Reply)
Discussion started by: ashokd001
1 Replies

5. Debian

Can't see anything after debian loads

Hey, I recently installed Debian on a desktop PC but when it starts I can't see anything (the monitor say no signal). I don't have any idea or even a way to figure out what going on here since I can't see anything at all not even the console. Is there something that I missed in the install, or is... (22 Replies)
Discussion started by: neur0n
22 Replies

6. Programming

Python pickle.loads(string)

Will this sentence return the decode of the string? Why I put a string in it but the system say: invaild load key (1 Reply)
Discussion started by: Henryyy
1 Replies

7. UNIX for Dummies Questions & Answers

launchctl loads app with icon (OS X)

We are deploying an app to our students that is running as a daemon. It keeps them from using certain software. The problem is that when we initially deploy it we don't want to require a restart. So we decided to use launchctl to load the daemon manually. When we do it this way, though, the... (4 Replies)
Discussion started by: nextyoyoma
4 Replies

8. Shell Programming and Scripting

Bash script parallel tasks and command to wait untill complete?

Hello, im having bash script with while *** command1 && command2 && command3 && done i want to ask how i can prevent overloading server, by waiting untill all commands complete? any low resources intensive command like "wait" - i dont know if exist? (2 Replies)
Discussion started by: postcd
2 Replies

9. AIX

Su loads .profile with argument

Hello, Is there any way to su another user and loading its profile with an argument. For example I am user1 and I want to start user2 user2 .profile is interactive asking user to pass some values I want to automate a process by switching user and if I pass an argument the interactive... (4 Replies)
Discussion started by: geodimo
4 Replies

10. Shell Programming and Scripting

How to iterate a function untill last argument with any order of input?

HI I need to get the function "kick" to get executed in any way the parameters are passed in to the function. The parameters are first stored in a dictionary self.otherlist = {} print self.otherlist self.populateTestList(self.system_type) print... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies
VACATION(1)						      General Commands Manual						       VACATION(1)

NAME
vacation - return ``I am on vacation'' indication SYNOPSIS
vacation -I vacation user DESCRIPTION
Vacation returns a message to the sender of a message telling that you are on vacation. The intended use is in a .forward file. For exam- ple, your .forward file might have: eric, "|vacation eric" which would send messages to you (assuming your login name was eric) and send a message back to the sender. Vacation expects a file .vacation.msg in your home directory containing a message to be sent back to each sender. It should be an entire message (including headers). For example, it might say: From: eric@ucbmonet.Berkeley.EDU (Eric Allman) Subject: I am on vacation Delivered-By-The-Graces-Of: the Vacation program I am on vacation until July 22. If you have something urgent, please contact Joe Kalash <kalash@ucbingres.Berkeley.EDU>. --eric This message will only be sent once a week to each unique sender. The people who have sent you messages are kept in the files .vaca- tion.pag and .vacation.dir in your home directory. The -I option initializes these files, and should be executed before you modify your .forward file. If the -I flag is not specified, vacation reads the first line from the standard input for a UNIX-style ``From'' line to determine the sender. If this is not present, a nasty diagnostic is produced. Sendmail(8) includes the ``From'' line automatically. No message is sent if the initial ``From'' line includes the string ``-REQUEST@'' or if a ``Precedence: bulk'' or ``Precedence: junk'' line is included in the header. SEE ALSO
sendmail(8) 4.3 Berkeley Distribution June 16, 1985 VACATION(1)
All times are GMT -4. The time now is 09:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy