deadbeef79000

joined 1 year ago
[–] deadbeef79000@lemmy.nz 2 points 8 months ago

Protects you from accidentally changing the variable within the block too!

[–] deadbeef79000@lemmy.nz 7 points 8 months ago* (last edited 8 months ago)

Yes! But -u is for undefined variables. It won't stop a defined variable with an empty value. E.g foo="".

Also ? and :? have the advantage of telling you right then and there where the variable use is that it must be defined or not empty... having to trek back to (likely) the top of the script to check is easily forgotten.

[–] deadbeef79000@lemmy.nz 63 points 8 months ago* (last edited 8 months ago) (9 children)

rm -rf ${var}/ is a disaster waiting to happen.

Always do rm -rf "${var:?}/" so that the script aborts if the variable is empty. Or better yet rm -rf "./${var:?}/".

Edited to add quotes. Always quote a path: it might have spaces in it, without quotes that will become multiple paths! Which would also have avoided the particular bug in question.

[–] deadbeef79000@lemmy.nz 1 points 8 months ago

Sweet, a win-win then!

[–] deadbeef79000@lemmy.nz 3 points 8 months ago (2 children)

I detest that meme, but you made me snort.

[–] deadbeef79000@lemmy.nz 1 points 8 months ago* (last edited 8 months ago)

Lol, down votes from chumps who can't tell the difference between NVIDIA's excellent hardware and Nvidia's shitty business practice.

[–] deadbeef79000@lemmy.nz 17 points 8 months ago (6 children)

One of which is French, yes.

[–] deadbeef79000@lemmy.nz 7 points 8 months ago (1 children)

They just need to gate-keep harder. It'll work next time.

Imagine being that invested in a corporate brand.

[–] deadbeef79000@lemmy.nz 35 points 8 months ago (3 children)

Rather, I bought from the vendor who contributed their GPU drivers to the Linux Kernel. It just so happened that's AMD.

NVIDIA sycophants hate that one weird trick.

[–] deadbeef79000@lemmy.nz 7 points 8 months ago

I use them for additional network adaptors in one host.

In another I use them for NVMe adaptors for an ancient MB that predates the existence of the m.2 interface.

[–] deadbeef79000@lemmy.nz 6 points 8 months ago

It's cheaper to install malware.

That's all there is to it: cost.

[–] deadbeef79000@lemmy.nz 2 points 8 months ago

"A joke everyone liked"

"Chums"

view more: ‹ prev next ›