官术网_书友最值得收藏!

Summary

This marks the end of the chapter and I am sure that you might have found this useful. Especially for those making a start with bash scripting, this chapter must have built a firm foundation on which you can build your knowledge.

We began by ensuring that bash is secure and not susceptible to embedded functions shell-shock. With bash secured, we considered the execution hierarchy where aliases, functions, and so on are checked before the command; knowing this can help us plan a good naming structure and a path to locate the scripts.

Soon we were writing simple scripts with static content but we saw how easy it was to add flexibility using arguments. The exit code from the script can be read with the $? variable and we can create a command line list using || and &&, which depends on the success or failure of the preceding command in the list.

Finally, we closed the chapter by looking at debugging the script. Its not really required when the script is trivial, but it will be useful later when complexity is added.

In the next chapter, we will be creating interactive scripts that read the user's input during script execution.

主站蜘蛛池模板: 鞍山市| 景泰县| 秦安县| 普定县| 黄梅县| 江山市| 尖扎县| 信宜市| 都匀市| 苏尼特左旗| 康乐县| 闻喜县| 诏安县| 奉化市| 行唐县| 卢龙县| 方山县| 南投市| 万年县| 醴陵市| 鹤壁市| 突泉县| 永兴县| 会昌县| 台东县| 乌兰县| 聊城市| 改则县| 苏尼特左旗| 莱阳市| 旬邑县| 尼玛县| 军事| 新余市| 南城县| 长宁县| 龙口市| 开化县| 车险| 彩票| 宜兴市|