Fix odd error message in 2020/endoh3/run_clock.sh

When running the script from the shell one would get:

    -bash: ./run_clock.sh: cannot execute: required file not found

and when running from within vim one would get:

    /bin/bash: ./run_clock.sh: /usr/bin/end: bad interpreter: No such file or directory

The problem was that the script had in the shebang /usr/bin/end not
/usr/bin/env.

When I updated the thanks-for-fixes.md file for this I also noted that I
reported to Yusuke in the preview period back in 2020 that in some
systems (it was macOS) due possibly to a timing issue there the script
(which the judges had added) did not work properly with 'make' so Yusuke
changed it to compile the code directly.
This commit is contained in:
Cody Boone Ferguson committed 2023-10-27 03:00:17 -07:00
1 parent 00e9874905
commit 7d28c7eec4
2 files changed
+39 -5

No files matched your search

+6 -5
View File
@@ -1,7 +1,8 @@
#!/usr/bin/end bash #!/usr/bin/env bash
while true; do while true; do
cc -std=c11 -Wall -Wextra -pedantic -O3 clock.c -o clock cc -std=c11 -Wall -Wextra -pedantic -O3 clock.c -o clock
clear clear
./clock | tee clock.c ./clock | tee clock.c
sleep 5 sleep 5
done done
+33
View File
@@ -2351,6 +2351,39 @@ debugging it since it works with `-O0`.
He also added the script [demo.sh](2019/karns/demo.sh) to showcase the entry a He also added the script [demo.sh](2019/karns/demo.sh) to showcase the entry a
bit more easily. bit more easily.
## [2020/endoh3](2020/endoh3/prog.c) ([README.md](2020/endoh3/README.md))
Cody fixed the script [run_clock.sh](2020/endoh3/run_clock.sh) which gave a
funny error when running it:
```sh
$ ./run_clock.sh
-bash: ./run_clock.sh: cannot execute: required file not found
```
If run from within vim a different error message occurred:
```
/bin/bash: ./run_clock.sh: /usr/bin/end: bad interpreter: No such file or directory
```
though this was only noticed later on after it was fixed.
What was wrong? A typo in the shebang which had `/usr/bin/end` instead of
`/usr/bin/env`. Anyone who knows Cody would know that he'd zoom in on that quite
quick.
Cody also reported (during the preview period of 2020) for some systems (at some
point?) like macOS the use of `make clock` would not work due possibly to a
timing issue so Yusuke changed it to compile the [clock.c](2020/endoh3/clock.c)
file directly (this might have been fixed in the Makefile later on but it
doesn't hurt to keep it in and this way it isn't a problem in any system). How
Cody remembers this minor detail more than three years ago is something that
many people might wonder but he also once told us that if someone moves
something of his even a millimetre from where it was he knows it so he might be
called unusual (and he argues, with pride, eccentric :-) ) :-)
## [2020/ferguson2](2020/ferguson1/prog.c) ([README.md](2020/ferguson1/README.md)) ## [2020/ferguson2](2020/ferguson1/prog.c) ([README.md](2020/ferguson1/README.md))
Cody, with intentional irony here :-), fixed formatting, links and typos in Cody, with intentional irony here :-), fixed formatting, links and typos in