env - 프로그램을 다른 환경에서 실행한다.
env [옵션]... [-] [이름=값]... [명령 [인자]...]
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.
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)EN 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>.
이 프로그램은 자유 소프트웨어입니다: 자유롭게 바꾸고 재배포할 수 있습니다. 법률이 허용하는 모든 범위내의 보증은 없습니다.