Skip to content
Advertisement

How to specify two variables on bash command line?

For example, I can do this:

JavaScript

But how can I do this?

JavaScript

I cannot use this:

JavaScript

I have to do it in one line

Advertisement

Answer

As far as I know, every Bourne shell allows any number of name=value pairs preceding the command to establish the environment. Bash certainly does.

JavaScript
Advertisement