I have a script where i need to run a spicific function at certian intervals while the rest of the script executes normally.
For example... I want to get disk data every hour while the rest of the scripts gathers process data every second...
Here I have a basic script to test this but its not working as expected...
#!/bin/bash
function test () {
echo "This line should print all the time..."
}
function test2 () {
echo "This line should only print every 3 seconds..."
sleep 3
}
while :
do
test &
test2
done
Any help would be.... helpful :-D
Thanks!