리눅스 $SHELLOPTS

Jmnote (토론 | 기여)님의 2016년 11월 22일 (화) 10:36 판 (→‎개요)

1 개요

리눅스 $SHELLOPTS
  • "shell options"
  • 쉘 옵션들을 담은 리눅스 환경변수
  • readonly 속성의 환경변수
  • 콜론(:)으로 구분되는 목록으로 구성된 문자열
항목들은 ABC순으로 정렬됨
root@zetawiki:~# echo $SHELLOPTS
braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
root@zetawiki:~# readonly | grep SHELLOPTS
declare -r SHELLOPTS="braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor"

2 실습

root@zetawiki:~# echo $SHELLOPTS
braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
root@zetawiki:~# set -o vi
root@zetawiki:~# echo $SHELLOPTS
braceexpand:hashall:histexpand:history:interactive-comments:monitor:vi
root@zetawiki:~# set -o emacs
root@zetawiki:~# echo $SHELLOPTS
braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
root@zetaknow:~# set -e
root@zetaknow:~# echo $SHELLOPTS
braceexpand:emacs:errexit:hashall:histexpand:history:interactive-comments:monitor
root@zetaknow:~# set +e
root@zetaknow:~# echo $SHELLOPTS
braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}