BROWNTOWN
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
LoveEspresso@retrofed.com to Explain Like I'm Five@lemmy.worldEnglish · 4 months ago

What is it saying in my terminal ?

retrofed.com

message-square
13
link
fedilink
1

What is it saying in my terminal ?

retrofed.com

LoveEspresso@retrofed.com to Explain Like I'm Five@lemmy.worldEnglish · 4 months ago
message-square
13
link
fedilink
alert-triangle
You must log in or # to comment.
  • ratajs@thelemmy.club
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    This syntax works for me on Bash and Zsh. Your shell might have a different way of writing escape sequences.

    • LoveEspresso@retrofed.comOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      Bash and Zsh are identical ??

  • Jerkface (any/all)@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    how did you decide which parts to quote…?

    • LoveEspresso@retrofed.comOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      I simply copied down the commands in the lesson.

  • gravitas_deficiency@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    $ 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: \$

    • SpikesOtherDog@ani.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

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

      • LoveEspresso@retrofed.comOP
        link
        fedilink
        English
        arrow-up
        0
        ·
        4 months ago

        The actual folder is ‘folder’$‘\003’ .

        • hemko@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          0
          ·
          4 months ago

          Is this some school task…? Why is there a folder with such a name 😅

          • LoveEspresso@retrofed.comOP
            link
            fedilink
            English
            arrow-up
            0
            ·
            4 months ago

            Apparently yes. I’m learning things on my own.

        • gravitas_deficiency@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          0
          ·
          4 months ago

          In that case, I think you want

          rm -rf "'folder'\$'\\003'"
          

          Note the double escape before 003, which will render to the character literal \

          Alternatively, start typing

          rm -rf \'fo
          

          And then hit tab until fish autocompletes the directory you want to kill, and run it.

          Side note: i would absolutely not tolerate directories named like that lol

          • LoveEspresso@retrofed.comOP
            link
            fedilink
            English
            arrow-up
            0
            ·
            4 months ago

            Thanks for the tip.

      • LoveEspresso@retrofed.comOP
        link
        fedilink
        English
        arrow-up
        0
        ·
        4 months ago

        Fish is different ?

  • hobata@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    fish expected a variable name after $

Explain Like I'm Five@lemmy.world

explainlikeimfive@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

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.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 4 users / week
  • 41 users / month
  • 385 users / 6 months
  • 0 local subscribers
  • 22.6K subscribers
  • 164 Posts
  • 1.81K Comments
  • Modlog
  • mods:
  • i_stole_ur_taco@lemmy.ca
  • schnurrito@discuss.tchncs.de
  • BE: 0.19.19
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org