![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| option followed by : taking next option if argument missing with getopts | gurukottur | Shell Programming and Scripting | 2 | 03-17-2008 08:46 AM |
| No Password - - Setuid Only Option in Solaris 10 | leond | UNIX for Dummies Questions & Answers | 1 | 08-24-2007 07:57 AM |
| find with prune option | highlt | UNIX for Advanced & Expert Users | 11 | 01-04-2007 07:29 AM |
| -s option to find object exists not working. | markjason | Shell Programming and Scripting | 2 | 10-18-2006 11:06 AM |
| Solaris C compiler option -Xc | BCarlson | High Level Programming | 3 | 07-20-2006 07:47 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
AIX to SOLARIS conversion - (find -cmin option)
I have a piece of code (below) in a .ksh script running on AIX. I need to convert the code to run .zsh on Solaris. Solaris's find command does not support the -cmin function. Suggestions??
The code searchs for a file (_filename) and determines if it has been written to or modified in the last 5 minutes. If it has, it goes to sleep for 5 minutes and then checks again. Code:
LOOP=1
while [ ${LOOP} -eq 1 ]
do
find . -cmin -5 -name ${_filename} | read NEW_FILE
if [ ! -z ${NEW_FILE} ]
then
echo "INFO: preprocess_dc: Time index "`date`". The file ${_filename} is less than five minutes old."
echo "INFO: preprocess_dc: Waiting $vSleepTime seconds to verify the file is not still being written."
sleep $vSleepTime
else
LOOP=0
fi
done
Last edited by Yogesh Sawant; 06-11-2008 at 10:20 PM. Reason: added code tags |
|||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|