'Bash function loop every X time
im doing a script to gather and clean some logs, but im thinking the best way is to put inside a function because runs in different lapses. But there are some commands that only runs once not in loop.
## Runs every 24 hours
while :
do
cp file/logs ~/new/path
touch file/logs
sleep 86400
done
## Show the Lines and send message
while :
do
wc -l logs | send_notification 'INFO'
sleep 3600
done
Is there a way that make that inside a function or what is a good way to make the two loops works?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
