Shell Scripting Recipes: A Problem-Solution Approach
When I was introduced to Unix in 1990, it was still the domain of multiuser systems and high-end workstations. Even the i386 system I started with had 12 users logging on concurrently through serial terminals. I had remote access through a blazingly fast 1200 bps modem. Things were changing by the...
Đã lưu trong:
Tác giả chính: | |
---|---|
Định dạng: | Sách |
Ngôn ngữ: | English |
Được phát hành: |
Apress
2013
|
Những chủ đề: | |
Truy cập trực tuyến: | http://scholar.dlu.edu.vn/thuvienso/handle/DLU123456789/34734 |
Các nhãn: |
Thêm thẻ
Không có thẻ, Là người đầu tiên thẻ bản ghi này!
|
Thư viện lưu trữ: | Thư viện Trường Đại học Đà Lạt |
---|
id |
oai:scholar.dlu.edu.vn:DLU123456789-34734 |
---|---|
record_format |
dspace |
institution |
Thư viện Trường Đại học Đà Lạt |
collection |
Thư viện số |
language |
English |
topic |
Computer Approach |
spellingShingle |
Computer Approach Johnson, Chris F. A Shell Scripting Recipes: A Problem-Solution Approach |
description |
When I was introduced to Unix in 1990, it was still the domain of multiuser systems and
high-end workstations. Even the i386 system I started with had 12 users logging on concurrently through serial terminals. I had remote access through a blazingly fast 1200 bps modem. Things were changing by the mid-1990s, when systems using the Linux kernel, integrated with GNU utilities and the X Window System, provided a viable alternative to Microsoft Windows. At the same time, computers with the power, memory, and hard drive space to run it came
within reach of an individual’s pocketbook. The Internet brought fast and efficient distribution of the new systems and software (and enabled their development in the first place). Unix had arrived on the home computer. The twenty-first century has seen the burgeoning of a new breed of Unix user: the home (or small business) user whose computer experience was previously limited, at most, to Microsoft Windows. Such computers may well be used by only one person. This modern user quite likely
has no intention of becoming a system administrator, and just wants to use the computer with as little fuss as possible.
If that describes you, I hope this book will be an eye-opener. I want to give you a glimpse of the power of the shell. Shell scripts are not just for system administration; they can automate
many tasks and solve many different problems. This book is not a tutorial, but by studying the scripts (after reading Chapter 1), you should gain a good grounding in the techniques of shell programming (and most of them can also be used at the command line). If you are an experienced shell scripter, you may find in these pages the scripts you never got around to writing—perhaps even programs you didn’t think could be implemented as shell scripts. A few here had been on my to-do list for years; writing this book gave me the incentive to develop them. I hope you’ll also find interesting techniques and different ways of doing things. |
format |
Book |
author |
Johnson, Chris F. A |
author_facet |
Johnson, Chris F. A |
author_sort |
Johnson, Chris F. A |
title |
Shell Scripting Recipes: A Problem-Solution Approach |
title_short |
Shell Scripting Recipes: A Problem-Solution Approach |
title_full |
Shell Scripting Recipes: A Problem-Solution Approach |
title_fullStr |
Shell Scripting Recipes: A Problem-Solution Approach |
title_full_unstemmed |
Shell Scripting Recipes: A Problem-Solution Approach |
title_sort |
shell scripting recipes: a problem-solution approach |
publisher |
Apress |
publishDate |
2013 |
url |
http://scholar.dlu.edu.vn/thuvienso/handle/DLU123456789/34734 |
_version_ |
1757661297316462592 |
spelling |
oai:scholar.dlu.edu.vn:DLU123456789-347342014-01-20T01:43:51Z Shell Scripting Recipes: A Problem-Solution Approach Johnson, Chris F. A Computer Approach When I was introduced to Unix in 1990, it was still the domain of multiuser systems and high-end workstations. Even the i386 system I started with had 12 users logging on concurrently through serial terminals. I had remote access through a blazingly fast 1200 bps modem. Things were changing by the mid-1990s, when systems using the Linux kernel, integrated with GNU utilities and the X Window System, provided a viable alternative to Microsoft Windows. At the same time, computers with the power, memory, and hard drive space to run it came within reach of an individual’s pocketbook. The Internet brought fast and efficient distribution of the new systems and software (and enabled their development in the first place). Unix had arrived on the home computer. The twenty-first century has seen the burgeoning of a new breed of Unix user: the home (or small business) user whose computer experience was previously limited, at most, to Microsoft Windows. Such computers may well be used by only one person. This modern user quite likely has no intention of becoming a system administrator, and just wants to use the computer with as little fuss as possible. If that describes you, I hope this book will be an eye-opener. I want to give you a glimpse of the power of the shell. Shell scripts are not just for system administration; they can automate many tasks and solve many different problems. This book is not a tutorial, but by studying the scripts (after reading Chapter 1), you should gain a good grounding in the techniques of shell programming (and most of them can also be used at the command line). If you are an experienced shell scripter, you may find in these pages the scripts you never got around to writing—perhaps even programs you didn’t think could be implemented as shell scripts. A few here had been on my to-do list for years; writing this book gave me the incentive to develop them. I hope you’ll also find interesting techniques and different ways of doing things. About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv About the Technical Reviewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi CHAPTER 1 The POSIX Shell and Command-Line Utilities . . . . . . . . . . . . . . . . . . . . 1 CHAPTER 2 Playing with Files: Viewing, Manipulating, and Editing Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 CHAPTER 3 String Briefs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 CHAPTER 4 What’s in a Word? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 CHAPTER 5 Scripting by Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 CHAPTER 6 Loose Names Sink Scripts: Bringing Sanity to Filenames. . . . . . . 137 CHAPTER 7 Treading a Righteous PATH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 CHAPTER 8 The Dating Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 CHAPTER 9 Good Housekeeping: Monitoring and Tidying Up File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 CHAPTER 10 POP Goes the E-Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 CHAPTER 11 PostScript: More Than an Afterthought . . . . . . . . . . . . . . . . . . . . . . . . 229 CHAPTER 12 Screenplay: The screen–funcs Library . . . . . . . . . . . . . . . . . . . . . . . . . 251 CHAPTER 13 Backing Up the Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 CHAPTER 14 Aging, Archiving, and Deleting Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 CHAPTER 15 Covering All Your Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 CHAPTER 16 Home on the Web. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 CHAPTER 17 Taking Care of Business . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 CHAPTER 18 Random Acts of Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 CHAPTER 19 A Smorgasbord of Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 CHAPTER 20 Script Development Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 APPENDIX Internet Scripting Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 INDEX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 2013-07-18T02:18:10Z 2013-07-18T02:18:10Z 2005 Book 1-59059-471-1 http://scholar.dlu.edu.vn/thuvienso/handle/DLU123456789/34734 en application/pdf Apress |