This syntax works for me on Bash and Zsh. Your shell might have a different way of writing escape sequences.
Bash and Zsh are identical ??
how did you decide which parts to quote…?
I simply copied down the commands in the lesson.
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:\$They are using fish, FYI. Not sure how much of a difference this makes.
The actual folder is ‘folder’$‘\003’ .
Is this some school task…? Why is there a folder with such a name 😅
Apparently yes. I’m learning things on my own.
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 \'foAnd then hit tab until
fishautocompletes the directory you want to kill, and run it.Side note: i would absolutely not tolerate directories named like that lol
Thanks for the tip.
Fish is different ?
fish expected a variable name after $



