This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: bash: simple command problem
This is not specifically related to Cygwin.
Anyway, your command does not work because the variables (variableA and
nextVariable) are expanded by Bash before the line is executed (as always).
In fact, something like this would work:
variableA=valA nextVariable=next eval 'echo $variableA $nextVariable'
Ciao,
Danilo
cygwin.20.job@spamgourmet.com wrote:
Hi Folks
I hove the problem to set variable in front of executing a command. The
bash manpage says that a simple command is a set of variable assignment
followed by the command
So I think that
variableA=valA nextVariable=next echo $variableA $nextVariable
should echo valA next but when I try this in the bash the echo is empty
Did I understand something wrong or is it a bug?
Regards
Franz
--
--------------------------------------
Danilo Turina
Alcatel Optics OND Network Management
Rieti (Italy) - Phone: +39 0746 600332
--------------------------------------
3 anni 2 mesi 16 giorni 2 ore 5 minuti 45 secondi
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/