I want to create an environment variable for this command:
git --git-dir= echo test-folder/.git/ add Steps-to-follow.txt && git --git-dir= echo test-folder/.git/ commit
This is a relevant excerpt from my ~/.bash_profile
:
export git11='git --git-dir='
export equal==
export git12='test-folder/.git/ add Steps-to-follow.txt && git --git-dir='
export git13='test-folder/.git/ commit'
I tried $variable-name
one after the other for all those variables but I think the shell blob, on expanding, is not passing it in the way I want it to appear (due to standards compliance of some type).
I haven't really used
export equal==
but I have it there (I was trying random thing for it to work).I tried piping the commands but that's stupid, that is not supposed to work.
I think the issue is with
=
sign in the environment variable (probably it is assuming the start of some other assignment). Meta character type input is not working (i.e.,\=
in place of=
).
Some help in this will be really helpful.
&&
. – G-Man Says 'Reinstate Monica' Apr 03 '16 at 22:40I figured out && is the bad guy here but if I am trying to combine two commands in one using && and then I want to use some environment variable for it, it is not possible at all I suppose ?
– Avineshwar Apr 03 '16 at 23:08