This chapter is not intended to be a tutorial on shell programming but to cover some basic concepts that are useful for beginners to know about and some common mistakes that are often encountered. I strongly recommend that you study the Advanced Bash Scripting Guide and use this chapter as a quick reference only. Here we treat bash syntax as the most common syntax. Most of the constructs will work in shells other than csh/tcsh. I deliberately do not include all shell expressions and do not show all the features of the described constructs, but only the main ones. I highly advise you to learn advanced bash syntax, as it helps you to understand not yours scripts and write efficient bash code.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Shell Scripts – Basics and Common Mistakes

  • Sergey Zhumatiy

摘要

This chapter is not intended to be a tutorial on shell programming but to cover some basic concepts that are useful for beginners to know about and some common mistakes that are often encountered. I strongly recommend that you study the Advanced Bash Scripting Guide and use this chapter as a quick reference only. Here we treat bash syntax as the most common syntax. Most of the constructs will work in shells other than csh/tcsh. I deliberately do not include all shell expressions and do not show all the features of the described constructs, but only the main ones. I highly advise you to learn advanced bash syntax, as it helps you to understand not yours scripts and write efficient bash code.