This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Thank you" answers: | |
Rather than adding a separate "Thank you", upvote the answer(s) that helped you, and consider ["accepting" the answer](https://unix.stackexchange.com/help/someone-answers) that was the most helpful in resolving your issue. These are the best ways of showing gratitude on this site. Accepting an answer not only marks the question as resolved, but also signals to _future readers_ that the accepted answer actually solved the issue. More information about this is available here: https://unix.stackexchange.com/help/someone-answers | |
"Thank you" comments (should have been an accepted answer): | |
Good! If this solves your issue, please consider ["accepting" the answer](https://unix.stackexchange.com/help/someone-answers). This is the best way to show gratitude on this site. Accepting an answer not only marks the question as resolved, but also signals to _future readers_ that the accepted answer actually solved the issue. More information about this is available here: https://unix.stackexchange.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* See Tom Scott's YouTube video "FizzBuzz: One Simple Interview Question" | |
* https://youtu.be/QPZ0pIK_wsc | |
*/ | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int | |
main(int argc, char **argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function shtest | |
{ | |
# Will run the given command in all avaliable shells and capture and | |
# display the output generated on standard output as well as any | |
# diagnostic messages generated on standard error, together with the | |
# exit code. | |
grep '^[^#]' /etc/shells | ( | |
typeset -a tmpfiles | |
trap 'rm -f "${tmpfiles[@]}"' EXIT |