Skip to main content
10 events
when toggle format what by license comment
Oct 9, 2023 at 16:14 comment added J_H Hmmm, interesting. Guess I've always seen authors being explicit about error status (exit 1) or implicit about early successful exit. Ok, thanks, duly updated in the answer text.
Oct 9, 2023 at 16:13 history edited J_H CC BY-SA 4.0
Withdraw a $? remark.
Oct 9, 2023 at 12:13 comment added Toby Speight exit without argument is the same as exit $?. So not sure what your point is with that one.
Oct 9, 2023 at 3:39 vote accept Tobias Grothe
Oct 7, 2023 at 16:30 history edited J_H CC BY-SA 4.0
added 12 characters in body
Oct 7, 2023 at 16:25 comment added J_H Certainly at (and cron, which runs it) can handle bash scripts. But as you observe they default to using the more limited Bourne sh. Let us step back to ask a different question: "can they handle python scripts?" Yes, of course they can. How? With python myscript.py or perhaps via shebang line of #! /usr/bin/env python. Now return to running with bash. We accomplish that in the very same way, with a command of bash myscript.sh or perhaps a suitable initial shebang line. No one will confuse python source for shell script. They might with Bourne / bash, so take care when executing.
Oct 7, 2023 at 5:07 comment added Tobias Grothe "No bash ?" - I found out, that at ... -f ... can't handle bash scripts, but I don't know why.
Oct 7, 2023 at 5:04 comment added Tobias Grothe Thank you. sudo bash -c " ... " looks pretty good, it's ok to apply sudo to all the commands. The sleep 5 calls are not really necessary. My thought was to give Linux time to complete the file operations... docker system df and docker stats are just control outputs to see if everything is fine.
Oct 7, 2023 at 4:43 history edited J_H CC BY-SA 4.0
added 409 characters in body
Oct 7, 2023 at 4:35 history answered J_H CC BY-SA 4.0