![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
This example script works perfect only in following configuration:
Code:
daemon(){
echo $$ > ${PF}
while true;
do
if [ -r "${FILE}" ]
then
echo "`date +"%H:%M:%S"`" >> $FILE
sleep 3;
fi
done
}
#MAIN
case $1 in
-daemon)
daemon
;;
*)
$0 -daemon &
;;
esac
exit 0
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|