3 ms·
> Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? As well as the answers you've already been gi
by scubbo 3y ago
> Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste?
As well as the answers you've already been given (distinguishes input from output, distinguishes root from non-), one answer is contained in your own question - it prevents mindless copy-pasting.
- eviks 3y agoExcept it doesn't, removing $ has no positive effect on your mind
- scubbo 3y agoI'd claim that I'm technically correct - you _cannot_ mindlessly copy-paste `$-prefixed` code into a terminal and have it execute, because the `$` will result in a syntax error - but you are, indeed, correct to say that it is possible the _then_ mindlessly delete the `$` without thinking about the rest of the content. But it's another prompt, at least!
- eviks 3y agoif you want to be that technical, than start with the fact that you can easily mindlessly copy&paste, it just won't execute, which is technically a separate thing (another prompt is just an annoyance for no benefit)