1 개요[ | ]
- 리눅스 $SHELLOPTS
- "shell options"
- 쉘 옵션들을 담은 리눅스 환경변수
- readonly 속성임[1]
- 콜론(
:
)으로 구분되는 목록으로 구성된 문자열
- 항목들은 ABC순으로 정렬됨
Console
Copy
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 실습[ | ]
Console
Copy
root@zetawiki:~# echo $SHELLOPTS
braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
Console
Copy
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
Console
Copy
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 주석[ | ]
- ↑ 일반적인 변수 할당 방식으로는 변경불가. readonly 명령어를 써야 함
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.