리눅스 $SHELLOPTS

($SHELLOPTS에서 넘어옴)

1 개요[ | ]

리눅스 $SHELLOPTS
  • "shell options"
  • 쉘 옵션들을 담은 리눅스 환경변수
  • readonly 속성임[1]
  • 콜론(:)으로 구분되는 목록으로 구성된 문자열
항목들은 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 같이 보기[ | ]

4 주석[ | ]

  1. 일반적인 변수 할당 방식으로는 변경불가. readonly 명령어를 써야 함
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}