Cargando…

bash Idioms /

Shell scripts are everywhere, especially those written in bash-compatible syntax. But these scripts can be complex and obscure. Complexity is the enemy of security, but it's also the enemy of readability and understanding. With this practical book, you'll learn how to decipher old bash cod...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autores principales: Albing, Carl (Autor), Vossen, J. P. (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Sebastopol, Ca. : O'Reilly Media, Inc., 2022.
Edición:First edition.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)

MARC

LEADER 00000cam a22000007i 4500
001 OR_on1304905330
003 OCoLC
005 20231017213018.0
006 m o d
007 cr cnu|||unuuu
008 220322s2022 cau o 001 0 eng d
040 |a ORMDA  |b eng  |e rda  |e pn  |c ORMDA  |d OCLCO  |d EBLCP  |d OCLCF  |d OCLCQ  |d OCLCO 
020 |z 9781492094753 
035 |a (OCoLC)1304905330 
037 |a 9781492094746  |b O'Reilly Media 
050 4 |a QA76.76.O63 
082 0 4 |a 005.43  |2 23 
049 |a UAMI 
100 1 |a Albing, Carl,  |e author. 
245 1 0 |a bash Idioms /  |c by Carl Albing and JP Vossen. 
250 |a First edition. 
264 1 |a Sebastopol, Ca. :  |b O'Reilly Media, Inc.,  |c 2022. 
300 |a 1 online resource (167 pages) 
336 |a text  |b txt  |2 rdacontent 
337 |a computer  |b c  |2 rdamedia 
338 |a online resource  |b cr  |2 rdacarrier 
500 |a Includes index. 
520 |a Shell scripts are everywhere, especially those written in bash-compatible syntax. But these scripts can be complex and obscure. Complexity is the enemy of security, but it's also the enemy of readability and understanding. With this practical book, you'll learn how to decipher old bash code and write new code that's as clear and readable as possible. Authors Carl Albing and JP Vossen show you how to use the power and flexibility of the shell to your advantage. You may know enough bash to get by, but this book will take your skills from manageable to magnificent. Whether you use Linux, Unix, Windows, or a Mac, you'll learn how to read and write scripts like an expert. Your future you will thank you. You'll explore the clear idioms to use and obscure ones to avoid, so that you can: Write useful, flexible, and readable bash code with style Decode bash code such as ${MAKEMELC,,} and ${PATHNAME##*/} Save time and ensure consistency when automating tasks Discover how bash idioms can make your code clean and concise. 
505 0 |a Cover -- Copyright -- Table of Contents -- Preface -- Running bash -- bash on Mac -- bash in Containers -- Revision Control -- Hello World -- Conventions Used in This Book -- Using Code Examples -- O'Reilly Online Learning -- How to Contact Us -- Acknowledgments -- bash -- Reviewers -- O'Reilly -- From Carl -- From JP -- Chapter 1. A Big "if" Idiom -- The Big "if" -- Or ELSE... -- More than One -- More than One Again -- Don't Do This -- Style and Readability: Recap -- Chapter 2. Looping Lingo -- Looping Constructs -- Explicit Values -- Similar to Python -- Quotes and Spaces 
505 8 |a Developing and Testing for Loops -- while and until -- Style and Readability: Recap -- Chapter 3. Just in CASE -- Make Your Case -- A Realistic Use Case -- Motivation -- Our Script -- Wrapper Scripts -- One More Twist -- Style and Readability: Recap -- Chapter 4. Variable Vernacular -- Variable Reference -- Parameter Expansion -- Shorthand for basename -- Path or Prefix Removal -- Shorthand for dirname or Suffix Removal -- Other Modifiers -- Conditional Substitutions -- Default Values -- Comma-Separated Lists -- Modified Value -- RANDOM -- Command Substitution -- Style and Readability: Recap 
505 8 |a Chapter 5. Expressions and Arithmetic -- Arithmetic -- No Parentheses Needed -- Compound Commands -- Style and Readability: Recap -- Chapter 6. Functional Framework -- Calling Functions -- Defining Functions -- Function Parameters -- Function Return Values -- Local Variables -- Function Special Cases -- Time for printf -- POSIX Output -- Getting or Using the Date and Time -- printf for Reuse or Debugging -- Style and Readability: Recap -- Chapter 7. List and Hash Handling -- Commonalities -- Lists -- Hashes -- A Simple Word Count Example -- Style and Readability: Recap -- Chapter 8. Arguing 
505 8 |a Your First Argument -- Having Options -- Parsing Options -- Long Arguments -- HELP! -- Debug and Verbose -- Version -- Style and Readability: Recap -- Chapter 9. Files and More -- Reading Files -- read -- mapfile -- Brute Force -- Fiddling with IFS for Fun and Profit, to Read Files -- Pretend Files -- Drop-in Directories -- Using a Library -- Shebang! -- Unofficial bash Strict Mode -- Exit Codes -- It's a Trap! -- Here-Documents and Here-Strings -- Are We Interactive? -- Summary -- Chapter 10. Beyond Idioms: Working with bash -- Prompts -- bash Time Zone -- Getting User Input -- read -- pause 
505 8 |a Select -- Aliases -- Functions -- Local Variables -- Readline Hacks -- Using logger from bash -- Handling JSON with jq -- Grepping the Process List -- Rotating Old Files -- Embedded Documentation -- bash Debugging -- bash Unit Testing -- Summary -- Chapter 11. Developing Your Style Guide -- Readability -- Comments -- Names -- Functions -- Quoting -- Layout -- Syntax -- Other -- Script Template -- Other Style Guides -- bash Linter -- Summary -- Appendix A. The bash Idioms Style Guide -- Readability -- Comments -- Names -- Functions -- Quoting -- Layout -- Syntax -- Other -- Script Template 
590 |a O'Reilly  |b O'Reilly Online Learning: Academic/Public Library Edition 
650 0 |a Operating systems (Computers) 
650 0 |a Scripting languages (Computer science) 
650 6 |a Systèmes d'exploitation (Ordinateurs) 
650 6 |a Langages de script (Informatique) 
650 7 |a operating systems.  |2 aat 
650 7 |a Operating systems (Computers)  |2 fast 
650 7 |a Scripting languages (Computer science)  |2 fast 
700 1 |a Vossen, J. P.,  |e author. 
856 4 0 |u https://learning.oreilly.com/library/view/~/9781492094746/?ar  |z Texto completo (Requiere registro previo con correo institucional) 
938 |a ProQuest Ebook Central  |b EBLB  |n EBL6930924 
994 |a 92  |b IZTAP