ClemaX

joined 2 years ago
[–] ClemaX@lemm.ee 13 points 5 months ago* (last edited 5 months ago) (3 children)

It all makes sense when you think about the way it will be parsed. I prefer to use newlines instead of semicolons to show the blocks more clearly.

for file in *.txt
do
    cat "$file"
done

The do and done serve as the loop block delimiters. Such as { and } in many other languages. The shell parser couldn't know where stuff starts/ends.

Edit: I agree that the then/fi, do/done case/esac are very inconsistent.

Also to fail early and raise errors on uninitialized variables, I recommend to add this to the beginning of your bash scripts:

set -euo pipefail

Or only this for regular sh scripts:

set -eu

-e: Exit on error

-u: Error on access to undefined variable

-o pipefail: Abort pipeline early if any part of it fails.

There is also -x that can be very useful for debugging as it shows a trace of every command and result as it is executed.

[–] ClemaX@lemm.ee 2 points 5 months ago

Rust is special regarding references but Kotlin reads similarly.

[–] ClemaX@lemm.ee 2 points 6 months ago (1 children)

What are you missing on Firebase?

[–] ClemaX@lemm.ee 5 points 7 months ago* (last edited 7 months ago) (1 children)

The quieter you become, the more you are able to hear – Rumi

[–] ClemaX@lemm.ee 4 points 8 months ago

This + node_exporter.

[–] ClemaX@lemm.ee 3 points 9 months ago

Ah least they would need to know it first.

[–] ClemaX@lemm.ee 3 points 10 months ago* (last edited 10 months ago)

I don't think that browsers do that. There is HSTS but I think that it only checks if the connection is using TLS.

[–] ClemaX@lemm.ee 3 points 10 months ago (1 children)

I think you may want to use for device in /dev/disk/by-uuid/*

That doesn't explain why you aren't seeing messages. I see there is a shebang at the start of the script. Can you confirm that the script has the executable bit set for the root user?

[–] ClemaX@lemm.ee 2 points 10 months ago* (last edited 10 months ago)

It works with USB interfaces using passthrough. But yeah doesn't make a lot of sense.

[–] ClemaX@lemm.ee 4 points 10 months ago

In French, oursin (urchin) seems to be the diminutive of ours, which means bear. So oursin means something like "little bear".

[–] ClemaX@lemm.ee 10 points 1 year ago (1 children)

You wouldn't download a car‽

view more: ‹ prev next ›