The command below repeats the word "stage" three times. Is there a way to set a variable at the beginning of the command and then use it further on?
AWS_REGION="us-west-2" AWS_PROFILE="stage" mvn clean test -Dtest=KarateRunner#stage -DargLine="-Dkarate.env=stage"
Something like:
set env=stage && AWS_REGION="us-west-2" AWS_PROFILE="%env%" mvn clean test -Dtest=KarateRunner#%env% -DargLine="-Dkarate.env=%env%"
But this doesn't work, obviously.