this post was submitted on 17 Jun 2026
-5 points (36.8% liked)

Explain Like I'm Five

21442 readers
113 users here now

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators' instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] gravitas_deficiency@sh.itjust.works 5 points 6 hours ago* (last edited 5 hours ago) (8 children)

$ indicates that the string following is an env variable, but you just have a closing quote, so bash is confused.

If you want the literal character $ in your command, you must escape it: \$

Edit: afaik my answer does not change based on the fact that this is fish instead of bash or zsh. The $ is outside of the single quotes, and is thus being interpreted as an env var anchor.

[–] SpikesOtherDog@ani.social 1 points 5 hours ago (7 children)

They are using fish, FYI. Not sure how much of a difference this makes.

[–] LoveEspresso@retrofed.com 0 points 5 hours ago (1 children)
[–] Strider@lemmy.world 1 points 5 hours ago

Of course. It could work totally different from bash.

To be fair I saw some cool fish stuff and thought about using it but when maintaining a few thousand servers with bash its not viable to load an alternative shell to all of them.

load more comments (5 replies)
load more comments (5 replies)