← Back to post

Edit history

Most recent

@6 @star add a backslash (\) before the variable, that way it won't get interpreted c:

I primarily use it interactively though. for scripts I actually prefer not to use bash/shell, because shell substitution is extremely vulnerable to issues, exploits, etc. I only really use it if it makes much more sense than something like python, e.g if there's a bunch of shell commands I just need to chain, but if it's more than a few lines and needs string operations I often just move over to python

Original

@6 @star add a backslash (\) before the variable, that way it won't get interpreted c:

I primarily use it interactively though. for scripts I actually prefer not to use bash/shell though, because shell substitution is extremely vulnerable to issues, exploits, etc. I only really use it if it makes much more sense than something like python, e.g if there's a bunch of shell commands I just need to chain, but if it's more than a few lines and needs string operations I often just move over to python