Skip to content
Advertisement

Tag: zsh

Zsh bad substitution error when installing Influxdb2.0

I am following the installation instructions from this article but I get a bad substitution error from zsh when executing this command: What am I supposed to change for zsh? Answer ${DISTRIB_ID,,} is a Bash-specific parameter expansion to lowercase the value of the variable. https://askubuntu.com/a/383360/25077 suggests ${(L)DISTRIB_ID} as a corresponding operation in Zsh. But there is no real reason for

Escaping Backslashes and Double Quotes in zsh Alias

I am trying to create an alias that should turn into the following command: It’s straightforward to just do on bash, but on zsh, the command turns into I can’t get the ” or the to escape. Answer It looks like you’re treating the first and last double-quotes as ‘surrounding’ quotes for the entire expression, but that’s not how

Bash export variables but only for current command

I want to load some environment variables from a file before running a node script, so that the script has access to them. However, I don’t want the environment variables to be set in my shell after the script is done executing. I can load the environment variables like this: However, after the command is run, all of the environment

mixing process substitution and pipes in zsh

Using ZSH, I am trying to wrap a sed command into a function, then use it, while mixing pipes with process substution. Let me explain with an example: As you can see, in those 2 out of those 3 usages work. The last one is the one that intrigues me here. (Note that all commands work with bash) Can you

Advertisement