Can somebody show me how to make a program to do this action: after 5 minutes
echo "80" > /sys/class/leds/blue/brightness
I want this program run in the background (like
I can't do this because I don't know so much about Linux.
That way your script continues, or you restore control immediately, while a new background task of the script starts, with two commands: sleep, and echo.
The common error is trying to give either
To that wit, where I found it actively useful. In an embedded device I develop there's the main application that works with a watchdog. If it fails in a way that triggers the watchdog reset soon after startup, repeatedly, it's hard to fix remotely as the period between the OS start and the reset is quite short, not enough to ssh in, and block the app startup. So I need a way to determine the system restarted so fast and introduce a delay if it did, to give myself time to fix it manually.
If I log in and perform
that will run in the background
If you want something to run in 5 minutes, but the rest of your program to continue (or finish), you need to background the sleep as well:
This will print
The important part is the