- Mastering Linux Shell Scripting
- Andrew Mallett
- 124字
- 2021-07-30 09:40:45
Chapter 2. Creating Interactive Scripts
In Chapter 1, What and Why of Scripting with Bash, of this book we learned how to create a script and use some of its basics elements. These include optional parameters that we can pass through to the script when it is executed. In this chapter, we will extend this by using the read shell built-in command to allow for interactive scripts. Interactive scripts are scripts that prompt for information during the script execution. In doing so, we will cover the following topics:
- Using
echo
with options - Basic script using
read
- Adding comments
- Enhancing
read
scripts with prompts - Limiting the number of entered characters
- Control the visibility of the entered text
- Simple scripts to enforce our learning
推薦閱讀
- 高效微控制器C語言編程
- 深入淺出Windows API程序設計:編程基礎篇
- Android NDK Beginner’s Guide
- Magento 1.8 Development Cookbook
- 實戰Java高并發程序設計(第3版)
- Learning Salesforce Einstein
- 從零開始學C語言
- D3.js By Example
- 深入理解C指針
- Couchbase Essentials
- R數據科學實戰:工具詳解與案例分析
- 編寫高質量代碼:改善Objective-C程序的61個建議
- 大學計算機基礎
- SignalR:Real-time Application Development(Second Edition)
- 遠方:兩位持續創業者的點滴思考