itibaren man bash:
A simple command is a sequence of optional variable assignments followed by blank-separated words and redirections, and terminated by a control operator. The first word specifies the command to be executed, and is passed as argument zero. The remaining words are passed as arguments to the invoked command.
Bu yüzden yazmak tamamen yasal.
foo=bar echo $foo
ama beklediğim gibi çalışmıyor (sadece yeni bir satır basar). O zamandan beri bana çok garip geldi:
$ foo=bar printenv
foo=bar
TERM=rxvt-unicode
[...]
Birisi lütfen nerede yanlış yaptığımı açıklayabilir mi?
foo=bar eval 'echo eval sees $foo'; echo echo sees $foo(burada, beri$fooiçinde genişletilirevalkomut, değer irade orda ikame edilebilir, ancak bir sonraki yankı komutu için değil).