- 论坛徽章:
- 1
|
请教:"$-"与"$_"区别
man bash 看看 Special Parameters 那段:
- - Expands to the current option flags as specified upon invoca‐
- tion, by the set builtin command, or those set by the shell
- itself (such as the -i option).
- _ At shell startup, set to the absolute file name of the shell or
- shell script being executed as passed in the argument list.
- Subsequently, expands to the last argument to the previous com‐
- mand, after expansion. Also set to the full file name of each
- command executed and placed in the environment exported to that
- command. When checking mail, this parameter holds the name of
- the mail file currently being checked.
复制代码
我在 13 最後一段如此說:
好了,該是到了結束的時候了。
婆婆媽媽的跟大家囉唆了一堆關於 shell 的基礎概念,
目的不是要告訴大家"答案",而是要帶給大家"啟發"...
在日後關於 shell 的討論中,我或許會經常用"鏈接"方式指引回來十三問中的內容,
以便我們在進行技術探討時彼此能有一些討論基礎,而不至於各說各話、徒費時力。
但,更希望十三問能帶給你更多的思考與樂趣,至為重要的是透過實作來加深理解。
是的,我很重視"實作"與"獨立思考"這兩項學習要素,若你能夠掌握其中真義,那請容我說聲:
--- 恭喜﹗十三問你沒白看了﹗ ^_^ |
|