Hi,
Try this one,
i used to sleep the script, but you can configure it in cron without using sleep with for loop.
I dont know about what you are going to do if the err file exists.
Cheers,
Ranga:-)
I assume that's supposed to be a while loop, not a for. And the command substitution doesn't seem to have any reason to be there, unless you believe that the stdout of the utility run by xargs will yield a pipeline.
I want to create a script that emails a file created by Informix Ace if the file size is > 0. It is a list of exceptions. No exceptions...no message
This does not work:
THESIZE=`ls -lA /tmp/ds_treo.txt | awk -F' ' '{print $5}'`
if
then
(cat $DSDIR/ds_treo.txt) | mail -s "Treo... (1 Reply)
Hi
how can it be that say i have text (xls) file that is 661 bytes when i upload it to Solaris ftp its becomes 650 byes
and when i downloading it back its again 661 bytes
both in my local pc and Solaris ftp the file remains not corrupted and valid (2 Replies)
Hello,
I have a script that monitors files uploaded via ftp. After a successful upload, the file name is written to the pipe.
There is another program that reads this pipe and allows automatically run any program or script ( say test.sh ) to process the newly uploaded file.
cat test.sh... (2 Replies)
I have 2 files. I basically want to search both of them to see if the 1st column ($1) matches and if it matches then check to see if the 2nd column ($2) matches, then execute some code showing the results of the matches.
File 1:
AAA 123
misc blah
BBB 456
CCC 789
File 2:
... (2 Replies)
I don't quite know what I'm doing, so this simple script is proving a challenge.
Here is some pseudo code that doesn't work yet:
if tail -1 "WORKING.txt" >/dev/null | egrep "^NMBR=*" > /dev/null
then
curl -k 'http://www.myserver.com/log.cgi?input=$?'
echo "hi there"
fi
Purpose:... (3 Replies)
hi,
i have a service on unix platform, it will generate traces in a particular folder
i want to check using shell script if traces exist, then perform some action else continue to be in loop.
filename is service.tra
can you please help?
thanks (4 Replies)
While running script I am getting an error like
Few lines in data are not being processed.
After googling it I came to know that adding such line would give some memory to it
ini_set("memory_limit","64M");
my input file size is 1 GB.
Is that memory limit is based on RAM we have on... (1 Reply)
Hello,
I'm attempting to write a tool that checks an IP address for existing PTR records then if there are no PTR records does a ping to see if it response.
Then if there is no response, it should print a message saying
This is what I have so far.
#!/usr/bin/perl
$nxdomain =... (4 Replies)
Hi,
I am new to awk/unix and am trying to put together an awk script to perform an action similar to vlookup between the two csv files.
Here are the contents of the two files:
File 1:
Date,ParentID,Number,Area,Volume,Dimensions
2014-01-01,ABC,247,83430.33,857.84,8110.76... (9 Replies)
Discussion started by: Prit Siv
9 Replies
LEARN ABOUT NETBSD
sleep
SLEEP(1) BSD General Commands Manual SLEEP(1)NAME
sleep -- suspend execution for an interval of time
SYNOPSIS
sleep seconds
DESCRIPTION
The sleep utility suspends execution for a minimum of seconds. It is usually used to schedule the execution of other commands (see EXAMPLES
below).
Note: The NetBSD sleep command will accept and honor a non-integer number of specified seconds. This is a non-portable extension, and its
use will nearly guarantee that a shell script will not execute properly on another system.
When the SIGINFO signal is received, the estimate of the amount of seconds left to sleep is printed on the standard output.
EXIT STATUS
The sleep utility exits with one of the following values:
0 On successful completion, or if the signal SIGALRM was received.
>0 An error occurred.
EXAMPLES
To schedule the execution of a command for 1800 seconds later:
(sleep 1800; sh command_file >& errors)&
This incantation would wait half an hour before running the script command_file. (See the at(1) utility.)
To reiteratively run a command (with csh(1)):
while (1)
if (! -r zzz.rawdata) then
sleep 300
else
foreach i (*.rawdata)
sleep 70
awk -f collapse_data $i >> results
end
break
endif
end
The scenario for a script such as this might be: a program currently running is taking longer than expected to process a series of files, and
it would be nice to have another program start processing the files created by the first program as soon as it is finished (when zzz.rawdata
is created). The script checks every five minutes for the file zzz.rawdata, when the file is found, then another portion processing is done
courteously by sleeping for 70 seconds in between each awk job.
SEE ALSO at(1), nanosleep(2), sleep(3)STANDARDS
The sleep command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
BSD August 13, 2011 BSD