[gentoo] USE переменные

krishtaf

USE="-java" emerge mozilla
Как bash переваривает данную команду ? Т.е. как bash понимает что нужно в переменной USE убрать "java" и выполнить "emerge mozilla" ?

Julie16

А при чем тут баш? Ты создаешь переменную USE в которой записано -java. Когда система портежей видит в переменной USE -java, она понимает что mozilla надо собирать без жабы.

krishtaf

Вот это я понимаю:
USE="-java"; emerge mozilla
А вот это я не понимаю:
USE="-java" emerge mozilla
Можешь пояснить ?

Marinavo_0507

man bash

krishtaf

А при чем тут баш?

Marinavo_0507

в csh это не сработает

krishtaf

кстати, где именно в "man bash" про это написано ?
смотрю и не вижу. // глаза протер

Marinavo_0507

Simple Commands

tokuchu

Первый вариант как раз и не сработает.
Это переменные окружения для выполняемой команды так настраиваются.

krishtaf

ты опоздал

tokuchu

Ты уже успел man bash прочитать?

krishtaf

уже давно успел

krishtaf

 
SIMPLE COMMAND EXPANSION
When a simple command is executed, the shell performs the following
expansions, assignments, and redirections, from left to right.
1. The words that the parser has marked as variable assignments
(those preceding the command name) and redirections are saved
for later processing.
2. The words that are not variable assignments or redirections are
expanded. If any words remain after expansion, the first word
is taken to be the name of the command and the remaining words
are the arguments.
3. Redirections are performed as described above under REDIRECTION.
4. The text after the = in each variable assignment undergoes tilde
expansion, parameter expansion, command substitution, arithmetic
expansion, and quote removal before being assigned to the vari-
able.
If no command name results, the variable assignments affect the current
shell environment. Otherwise, the variables are added to the environ-
ment of the executed command and do not affect the current shell envi-
ronment. If any of the assignments attempts to assign a value to a
readonly variable, an error occurs, and the command exits with a non-
zero status.
If no command name results, redirections are performed, but do not
affect the current shell environment. A redirection error causes the
command to exit with a non-zero status.
If there is a command name left after expansion, execution proceeds as
described below. Otherwise, the command exits. If one of the expan-
sions contained a command substitution, the exit status of the command
is the exit status of the last command substitution performed. If
there were no command substitutions, the command exits with a status of
zero.

Чтобы не было неясностей о прочтении мана
Оставить комментарий
Имя или ник:
Комментарий: