Scroll to navigation

ENV(1) 사용자 명령 ENV(1)

이름

env - 프로그램을 다른 환경에서 실행한다.

요약

env [옵션]... [-] [이름=값]... [명령 [인자]...]

설명

각각의 환경 이름을 설정하고 명령을 실행합니다.

긴 옵션의 필수 인자값은 짧은 옵션에서도 마찬가지입니다.

빈 환경으로 시작합니다
-0, --null
각 출력 행을 개행 문자가 아닌 NUL로 끝냅니다
환경 변수를 제거합니다
작업 디렉터리를 디렉터리로 바꿈
문자열을 처리하고 개별 인자로 나눕니다 쉬뱅 #! 행에 다중 인자를 넘길 때 요긴합니다
명령으로의 시그널 전달을 차단합니다
시그널 처리 동작을 기본으로 초기화합니다
시그널 처리 동작을 하지 않고 무시합니다
비 기본 시그널 처리를 표준 오류에 나타냅니다
각 처리 단계별 자세한 정보를 출력합니다
이 도움말을 표시하고 나갑니다
버전 정보를 출력하고 나갑니다

단순 - 기호는 -i 옵션을 의미합니다. 지정 명령이 없다면 결과 환경을 출력합니다.

시그널은 'PIPE'와 같은 시그널 이름을 가지거나 '13' 같은 시그널 번호를 갖습니다. 시그널을 지정하지 않으면 알려진 모든 시그널이 해당합니다. 다중 시그널은 쉼표로 구분합니다. 빈 시그널 인자 값에 대해서는 동작하지 않습니다.

종료 상태코드:

125
env 명령 자체 처리에 실패했을 경우
126
명령을 찾았으나 실행하지 못한 경우
127
명령을 찾지 못한 경우
-
명령을 빠져나간 다른 경우

옵션

-S/--split-string usage in scripts

The -S option allows specifying multiple parameters in a script. Running a script named 1.pl containing the following first line:

#!/usr/bin/env -S perl -w -T
...

Will execute perl -w -T 1.pl .

Without the '-S' parameter the script will likely fail with:

/usr/bin/env: 'perl -w -T': 그런 파일이나 디렉터리가 없습니다

See the full documentation for more details.

--default-signal[=SIG] usage

This option allows setting a signal handler to its default action, which is not possible using the traditional shell trap command. The following example ensures that seq will be terminated by SIGPIPE no matter how this signal is being handled in the process invoking the command.

sh -c 'env --default-signal=PIPE seq inf | head -n1'

주의

POSIX's exec(3p) pages says:

"many existing applications wrongly assume that they start with certain signals set to the default action and/or unblocked.... Therefore, it is best not to block or ignore signals across execs without explicit reason to do so, and especially not to block signals across execs of arbitrary (not closely cooperating) programs."

저자

Richard Mlynarik, David MacKenzie, Assaf Gordon이(가) 작성함.

버그 보고

GNU coreutils 온라인 도움말: <https://www.gnu.org/software/coreutils/>
번역 버그는 <https://translationproject.org/team/ko.html>

저작권

저작권 © 2023 Free Software Foundation, Inc. 라이선스 GPLv3+: GNU GPL 버전 3 이상 <https://gnu.org/licenses/gpl.html>.
이 프로그램은 자유 소프트웨어입니다: 자유롭게 바꾸고 재배포할 수 있습니다. 법률이 허용하는 모든 범위내의 보증은 없습니다.

추가 참조

sigaction(2), sigprocmask(2), signal(7)

완전한 문서 <https://www.gnu.org/software/coreutils/env>
또는 로컬 문서: info '(coreutils) env invocation'

번역

이 매뉴얼 페이지의 한국어 번역은 다음에 의해 편집되었습니다:

이 번역은 무료 문서입니다. 저작권 조건에 대해서는 GNU General Public License 버전 3 이상을 읽으십시오. 책임이 없습니다.

이 매뉴얼 페이지의 번역에서 오류를 발견하면 translation-team-ko@googlegroups.com 로 이메일을 보내주십시오.

January 2024 GNU coreutils 9.4