Reputation
359
Next privilege 500 Rep.
Access review queues
Badges
5 16
Impact
~77k people reached

1d
awarded  Notable Question
Jan
19
answered How to rotate an image in gs
Dec
10
comment What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?
The teletypewriter (TTY) was first put in operation and exhibited at the Mechanics Institute in New York in 1844. en.wikipedia.org/wiki/Teleprinter
Nov
5
comment How to remove duplicate lines with awk whilst keeping empty lines?
I did not measure any significant time difference with my 288-line test file. However, your code certainly catches the prize for being the most readable.
Sep
17
awarded  Nice Question
Jul
10
accepted How to influence a bash while loop with a timed global variable?
Jul
9
revised How to influence a bash while loop with a timed global variable?
added 4 characters in body
Jul
9
revised How to influence a bash while loop with a timed global variable?
deleted 1 character in body
Jul
9
revised How to influence a bash while loop with a timed global variable?
grammar
Jul
9
comment Security implications of forgetting to quote a variable in bash/POSIX shells
This should make one wonder if we are really not better off writing Python scripts instead?
Jul
9
revised How to influence a bash while loop with a timed global variable?
added 1 character in body
Jul
9
revised How to influence a bash while loop with a timed global variable?
To have a fair comparison with other answers, I expanded the code to a working example.
Jul
9
comment How to influence a bash while loop with a timed global variable?
Yes, I have. In my real-world example the heartbeat is every 1800s (half an hour) and the random process is an iteration of about 10 times 3 minutes. I created a more breve example because I did not want respondents to lose their time with this.
Jul
9
suggested approved edit on How to influence a bash while loop with a timed global variable?
Jul
9
comment How to influence a bash while loop with a timed global variable?
Nice code, but it does not take care of schedule slippage (see above comment by Scott).
Jul
9
revised How to influence a bash while loop with a timed global variable?
added 57 characters in body
Jul
9
revised How to influence a bash while loop with a timed global variable?
deleted 6 characters in body
Jul
8
answered How to influence a bash while loop with a timed global variable?
Jul
8
comment How to influence a bash while loop with a timed global variable?
I saved your script under the name test and performed a chmod +x on it. Here is the error I get when trying to run it: ./test: 5: ./test: function: not found
Jul
8
comment How to influence a bash while loop with a timed global variable?
The correct way to initialise is lastTime=$(date --date='5seconds ago' +%s). This then also allows to have lastTime=$((currentTime - elapsedTime +5)), which coincides with the original attempt.