04-14-2005
Script execution dependent upon a file landing in a certain directory
Hi all,
I'm looking to write a script that is dependent upon the existence of 2 files each in separate directories. My thought was to do:
**psuedo code **
execute script
check directory 1 for file1
if file exists then
execute script 2 ( checking directory 2 for file 2)
else
wait 30 min, check directory 1
I suppose I could do this with a loop or a while statement, however, I'm unsure of the exact syntax for the check for file/wait for file statement... and the 30 min delay.
Any help would be appreciated.
P.S. This site is amazing, very informative, and very nicely done!!!
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Dear group,
I need to load dependent libraries for an application which is in ELF format.please let me know how to parse the ELF file to find dependent libraries.
thnaks in advance,
Ravinder (3 Replies)
Discussion started by: ravinder.are
3 Replies
2. UNIX for Dummies Questions & Answers
Hello,
Is it possible to make a file manager use different "colored folders" when browsing specific directories?
For example, if I open a gnome file manager and browse my windows share at, smb://192.168.1.101/z/ , can I make those folders appear green?
And when I open another instance of... (0 Replies)
Discussion started by: bz43
0 Replies
3. Shell Programming and Scripting
xxxxx (2 Replies)
Discussion started by: vinayrao
2 Replies
4. Shell Programming and Scripting
Hi Experts,
I have a script called test.sh. I am trying to execute it with sh -x test.sh. Where i can find sequence of steps executed one by one. Now i want to these executions to be captured in a file.
i.e sh -x test.sh > output.txt
the above one is notworking.
can anyone help me... (6 Replies)
Discussion started by: naree
6 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement that my server receives files from a third party. For this a new user(vendor) has been created and given to the vendor with the default home directory as /home/vendor on my server where he will be placed as soon as he logs into my server. Due to space issues on /home I... (2 Replies)
Discussion started by: bubba27
2 Replies
6. Shell Programming and Scripting
for file in File_Name*
do
ed -s $file << 'EOF'
0a
$Header_Record
.
$a
.
w
EOF
done
The above command is executing in the unix box but is not... (2 Replies)
Discussion started by: Kanch
2 Replies
7. Shell Programming and Scripting
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies
8. Shell Programming and Scripting
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Discussion started by: digioleg54
9 Replies
9. What is on Your Mind?
There is a know bug deep in the Javascript library d3.js which causes an intermediate charting rendering bug in Vue.js. In a nutshell, when a page is reloaded the chart data is not rendered sometimes, but when the Vue.js route changes (a menu item in the UserCP is selected), it works flawlessly.... (3 Replies)
Discussion started by: Neo
3 Replies
10. UNIX for Beginners Questions & Answers
Hi i have a file like this as shown below:
DA PROCESS_ID IDENTIFIER DA_FILE STATUS WAITING_FOR SCOPED_DEPENDENT
1836 21000 01052019 BH90P.TEMP.DA1836.FTP W NULL ... (6 Replies)
Discussion started by: krishnaswarnkar
6 Replies
LEARN ABOUT CENTOS
script-email
SCRIPT-EMAIL(8) System Administration Commands SCRIPT-EMAIL(8)
NAME
script-email - Amanda script to send email notifications
DESCRIPTION
script-email is an Amanda script implementing the Script API. It should not be run by users directly. It sends a notification email to the
addresses specified in the MAILTO property.
PROPERTIES
This section lists the properties that control script-email's functionality. See amanda-scripts(7) for information on the Script API,
script configuration.
MAILTO
List of email addresses that will receive an email on command execution. It is a multi-valued property:
property "MAILTO" "amanda@domain.com" "sysadmin@domain.com" "amandauser@domain.com"
EXAMPLE
In this example, script-email is scheduled to be run before the DLE, on the server. The unqualified email address amanda will be passed to
the email system unchanged. The script is then attached to a dumptype, which can then be specified for any DLEs which require
notification.
define script-tool pre-email {
comment "email me before this DLE is backed up"
plugin "script-email"
execute-on pre-dle-backup
execute-where server
property "mailto" "amanda"
}
define dumptype user-tar-email {
user-tar
script "pre-email"
}
SEE ALSO
amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHORS
Jean-Louis Martineau <martineau@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Dustin J. Mitchell <dustin@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.3 01/10/2013 SCRIPT-EMAIL(8)