10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a directory where sometimes appear a certain file name - and I'd like to be notified by email when that happens... so what command or script I may use?
e.g. if there's a file named "adam" in the directory named "dir1" then send a mail to "email@example.com".. it needs to permanently... (5 Replies)
Discussion started by: netrom
2. Shell Programming and Scripting
#This script will check status of load balancer in AIX servers from hopbox
#Steps to do as folows :
#Login to server
#netstat -ani | grep <IP>
#check if the output contains either lo0 OR en0
#if the above condition matches, validation looks good
#else, send an email with impacted... (7 Replies)
Discussion started by: vinil
3. Shell Programming and Scripting
I need a scripts to check specified file if it exists or not at certain time (say every month between 5th and 7th). if file exists do something otherwise do another thing.
can anybody help this?
Thanks in advance
:wall: (3 Replies)
Discussion started by: ken002
4. Shell Programming and Scripting
I am trying to write a script that checks whether or not, a file exists on multiple servers.
My code / logic so far is:
print "Enter File name to be checked"
ssh server1 "
cd /var/opt/logs ;
... (4 Replies)
Discussion started by: momin
5. Shell Programming and Scripting
Is there a way to keep checking for a file over and over again in the same script for an interval of time?
continue checking until file arrives
I don't want the script to run each time and email the user each time a file... (4 Replies)
Discussion started by: markdjones82
6. Shell Programming and Scripting
To check a bash script syntax without executing it we use:
bash -n scriptname
What should be the equivalent command for checking a ksh script? (8 Replies)
Discussion started by: proactiveaditya
7. UNIX for Dummies Questions & Answers
I'm trying to check a filesize within a script and then excute a relevant action. An example is below:
then rm $filename
then rm $filename2
Basically if $filename2 has a filesize of 0 then I want both files to be removed, but... (6 Replies)
Discussion started by: chris01010
8. Shell Programming and Scripting
Hi, Need help for a Script for checking and reporting database file sizes in a directory.
Request you to please give your valuable inputs.
Thanks a lot in advance.
Marconi (1 Reply)
Discussion started by: marconi
9. Shell Programming and Scripting
I have a really, what I hope is, simple question.
I'm looking for a simple way to see whether a file exists or not and then perform an action based on whether it exists or not. An example of what I tried is as follows:
echo "File mysql exists"
... (1 Reply)
Discussion started by: _Spare_Ribs_
10. UNIX for Dummies Questions & Answers
Is it possible to check the script syntax with some sort of command...? Without running the script .
I'm using Sun Solaris (3 Replies)
Discussion started by: bjornrud