![set -o 출력과 set +o 출력의 차이점은 무엇입니까?](https://linux55.com/image/187721/set%20-o%20%EC%B6%9C%EB%A0%A5%EA%B3%BC%20set%20%2Bo%20%EC%B6%9C%EB%A0%A5%EC%9D%98%20%EC%B0%A8%EC%9D%B4%EC%A0%90%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
내가 사용할 때 set -o
:
❯ set -o
noaliases off
aliasfuncdef off
allexport off
noalwayslastprompt off
alwaystoend on
appendcreate off
noappendhistory off
autocd on
autocontinue off
noautolist off
noautomenu off
autonamedirs off
noautoparamkeys off
...
내가 사용할 때 set +o
:
❯ set +o
set +o noaliases
set +o aliasfuncdef
set +o allexport
set +o noalwayslastprompt
set -o alwaystoend
set +o appendcreate
set +o noappendhistory
set -o autocd
set +o autocontinue
set +o noautolist
set +o noautomenu
...
set -o
on/off를 사용하고 set +o
+o/-o를 사용하세요.
유사성을 알 수 있는데 왜 사용됩니까 +o/-o
?
답변1
어떤 것들은 그렇게 되기 때문에 그렇습니다. 누군가가 그렇게 될 것이라고 결정했습니다.
If -o is supplied with no option-name, the values of the
current options are printed. If +o is supplied with no
option-name, a series of set commands to recreate the
current option settings is displayed on the standard
output.
+o
따르거나 -o
논쟁을 벌이는 경우에는 다른 의미를 -
갖습니다 .+