patternbashMinor
Baby-sitting bash script using DVD drive
Viewed 0 times
scriptdvdsittingusingdrivebabybash
Problem
This is the script I wrote to make an automated POC baby-sitter in 5 lines.
I first found this on a GIF or meme site and thought of making a POC script that does the same.
I don't know aything about bash. So, I want improvements.
You can find the origin and the script at
https://linuxandstuff.wordpress.com/2015/11/21/messing-with-the-dvd-drive-in-command-line/
I first found this on a GIF or meme site and thought of making a POC script that does the same.
#How Linux users babysit
while :
do
eject
eject -t
doneI don't know aything about bash. So, I want improvements.
You can find the origin and the script at
https://linuxandstuff.wordpress.com/2015/11/21/messing-with-the-dvd-drive-in-command-line/
Solution
These days a
You can alter the delay between rocks by changing the
watch is used to run any designated command at regular intervals.
http://www.linfo.org/watch.html
-T (toggle) argument exists. That allows us to make this a lot neater:watch -n0 eject -TYou can alter the delay between rocks by changing the
-n0 argument.watch is used to run any designated command at regular intervals.
http://www.linfo.org/watch.html
Code Snippets
watch -n0 eject -TContext
StackExchange Code Review Q#132439, answer score: 4
Revisions (0)
No revisions yet.