Sample Header Ad - 728x90

Run in background avoiding any job control message from the shell

4 votes
1 answer
220 views
Lets define a shell function (here the shell is Bash) and test it $ s () { xterm -e sleep 5 & } $ s 307926 $ + Done xterm -e sleep 5 $ With my specific meaning of *better*, I can redefine s like this $ s () { xterm -e sleep 5 & disown ; } $ s 307932 $ $ (no message from the shell when the job is finished). Here I have to ask, is it possible to define s so that I have $ s () { pre_magic xterm -e sleep 5 post_magic ; } $ s $ $ i.e., suppress the job info printed on terminal by the shell?
Asked by gboffi (1376 rep)
Apr 17, 2025, 01:52 PM
Last activity: Apr 17, 2025, 02:21 PM