unset
外觀
unset是一個內建的Unix shell命令,在Bourne shell家族(sh、ksh、bash等)和C shell家族(csh、tcsh等)都有實現。它可以取消設定一個shell變數,從主記憶體和shell的匯出環境中刪除它。它實現為一個殼層內建指令,因為它直接操縱shell的內部。
唯讀shell變數不能被unset。如果試圖unset唯讀變數,unset命令將列印一個錯誤訊息,並返回一個非零的退出代碼。
unset: unset values and attributes of variables and functions – 命令與工具(Commands & Utilities)參考,單一UNIX®規範第7期,由國際開放標準組織發布| 檔案系統 | |
|---|---|
| 程式 | |
| 使用者環境 | |
| 文字編輯 |
|
| 殼層內建 | |
| 網路(英語:Network utility) | |
| 搜尋 | |
| 文件 |
|
| 軟體開發 | |
| 雜項 | |