(sleep 10; ls -al) &
The parenthesis tell bash to execute the stuff inside the parenthesis in another process, the & at the end tells it to make that process run in the background (i.e., immediately releasing the console so it can issue the next prompt). So then you'll get the next expected prompt, but the inner command will sleep for 10 seconds, and then list the directory contents. Just replace the ls command with the appropriate reboot command and you should be good to go.
roboticus@sparky:~/tmp$ date
Wed Jul 2 17:04:29 EDT 2014
roboticus@sparky:~/tmp$ (sleep 10; ls -al) &
[1] 13508
roboticus@sparky:~/tmp$ date
Wed Jul 2 17:04:32 EDT 2014
roboticus@sparky:~/tmp$ date
Wed Jul 2 17:04:39 EDT 2014
roboticus@sparky:~/tmp$ total 144
drwxr-xr-x 2 roboticus roboticus 4096 Jun 19 11:18 .
drwxr-xr-x 39 roboticus roboticus 4096 Jul 2 17:00 ..
-rw-r----- 1 roboticus root 138227 Jun 12 15:30 ttt
[1]+ Done ( sleep 10; ls --color=auto -al )
roboticus@sparky:~/tmp$ date
Wed Jul 2 17:04:45 EDT 2014
...roboticus
When your only tool is a hammer, all problems look like your thumb. |