Quiz: You run the Unix or Linux command:
sleep 100 &
What is the most likely state of the sleep process immediately after you press Enter key?
a) Running in the foreground 🏃♀️
b) Running in the background 🏃♂️
c) Stopped 🛑
d) Zombie 🧟♀️
Quiz: You run the Unix or Linux command:
sleep 100 &
What is the most likely state of the sleep process immediately after you press Enter key?
a) Running in the foreground 🏃♀️
b) Running in the background 🏃♂️
c) Stopped 🛑
d) Zombie 🧟♀️
@nixCraft oh.. er.. i had a script where i needed to use "sleep &" for something, and it worked.. now, if i can remember what the script was, and why i would possibly need to do this.. and why it worked.
i'm gonna go B
@nixCraft
It's running in the foreground in its own process
The & means that process is also running in the background
Multitasking is a superpower 💪
Want to know more?
man ps is your friend