万本电子书0元读

万本电子书0元读

顶部广告

Bash Cookbook电子书

售       价:¥

15人正在读 | 0人评论 9.8

作       者:Ron Brash,Ganesh Naik

出  版  社:Packt Publishing

出版时间:2018-07-31

字       数:30.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn all the fundamentals of PHP with a book that blends theory with practice to build up the skills you need for modern web development. Key Features *Brush up on basic PHP 7 syntax and work with variables, data types, arrays, and loops *Master advanced concepts like building your own frameworks and creating your own applications *Apply your newly learned PHP skills to a variety of real-life business scenarios Book Description PHP is the preferred server-side scripting language for tech giants such as Facebook, Wikipedia, and Tumblr despite full-stack JavaScript gaining popularity with upcoming developers. This is because PHP performs better when dealing with heavy computations on the back end. In this book, you’ll learn everything you need to get up and running with the latest version of PHP, including package management with tools such as composer, secure database operations, and a whole host of other best practices that will help you stay a step ahead of traditional programmers. What you will learn *Understand the fundamentals of PHP and work with classes and inheritance *Learn about database operations and package management with composer *Tackle common security concerns and pitfalls using authentication and validation *Build effective PHP applications and frameworks for your business needs Who this book is for If you’re already familiar with another programming language and want to learn about the fundamentals of PHP programming, you’ll find the flow of this book to be an ideal fit. Having a prior understanding of HTML, MySQL, CSS, and JavaScript will be beneficial, but is not mandatory.
目录展开

Title Page

Copyright and Credits

Bash Cookbook

Packt Upsell

Why subscribe?

PacktPub.com

Contributors

About the authors

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Sections

Getting ready

How to do it...

How it works...

There's more...

See also

Get in touch

Reviews

Crash Course in Bash

Getting started with Bash and CLI fundamentals

Your first Bash script with Vim

Creating and using basic variables

Hands-on variable assignment

Hidden Bash variables and reserved words

Conditional logic using if, else, and elseif

Evaluating binary numbers

Evaluating strings

Nested if statements

Case/switch statements and loop constructs

Basic case statement

Basic loops

For loop

Do while loop

Until loop

Using functions and parameters

Using a function with parameters within a for loop

Including source files

Including/importing a library script and using external functions

Retrieving return codes and output

Return code 101

Linking commands, pipes, and input/output

Redirection and pipe bonzanza

Getting program input parameters

Passing your program flags

Getting additional information about commands

Summary

Acting Like a Typewriter and File Explorer

Introduction

Basic searching for strings and files

Getting ready

How to do it...

How it works...

Using wildcards and regexes

Getting ready

How to do it...

How it works...

Math and calculations in script

Getting ready

How to do it...

How it works...

Striping/altering/sorting/deleting/searching strings with Bash only

Getting ready

How to do it...

How it works...

Using SED and AWK to remove/replace substrings

Getting ready

How to do it...

How it works...

Formatting your data/output using echo and printf

Getting ready

How to do it...

How it works...

Readying your script for different languages with internationalization

Getting ready

How to do it...

How it works...

Calculating statistics and reducing duplicates based on file contents

Getting ready

How to do it...

How it works...

Using file attributes with conditional logic

Getting ready

How to do it...

How it works...

Reading delimited data and altered output format

Getting ready

How to do it...

How it works...

Understanding and Gaining File System Mastery

Introduction

Viewing files from various angles – head, tail, less, and more

Getting ready

How to do it...

How it works...

Searching for files by name and/or extension

Getting ready

How to do it...

How it works...

Creating a diff of two files and patching

Getting ready

How to do it...

How it works...

Creating symbolic links and using them effectively

How to do it...

How it works...

Crawling filesystem directories and printing a tree

Getting ready

How to do it...

How it works...

Finding and deleting duplicate files or directories

Getting ready

How to do it...

How it works...

Joining and splitting files at arbitrary positions

Getting ready

How to do it...

How it works...

Generating datasets and random files of various size

Getting ready

How to do it...

How it works...

Making a Script Behave Like a Daemon

Introduction

Running a program continuously (forever) using looping constructs or recursion

Getting ready

How to do it...

How it works...

Keeping programs/scripts running after logoff

Getting ready

How to do it...

How it works...

Invoking commands when they require permissions

Getting ready

How to do it...

How it works...

Sanitizing user input and for repeatable results

Getting ready

How to do it...

How it works...

Making a simple multi-level user menu using select

Getting ready

How to do it...

How it works...

Generating and trapping signals for cleanup

Getting ready

How to do it...

How it works...

Using temporary files and lock files in your program

Getting ready

How to do it...

How it works...

Leveraging timeout when waiting for command completion

Getting ready

How to do it...

How it works...

Creating a file-in-file-out program and running processes in parallel

Getting ready

How to do it...

How it works...

Executing your script on startup

Getting ready

How to do it...

How it works...

Scripts for System Administration Tasks

Introduction

Gathering and aggregating system information

Getting ready

How to do it...

How it works...

Gathering network information and connectivity diagnostics

Getting ready

How to do it...

How it works...

Configuring basic network connectivity

Getting ready

How to do it...

How it works...

Monitoring directories and files

Getting ready

How to do it...

How it works...

Compressing and archiving files

Getting ready

How to do it...

How it works...

Rotating files from RAM to storage for log rotation

Getting ready

How to do it...

Adding configuration to /etc/logrotate.d/

How it works...

Using Linux iptables for a firewall

Getting ready

How to do it...

How it works...

Accessing SQL databases remotely or locally

Getting ready

How to do it...

How it works...

Creating SSH keys for password less remote access

Getting ready

How to do it...

Creating and configuring cron Jobs for task scheduling

How to do it...

How it works...

Creating users and groups systematically

How to do it...

How it works...

Scripts for Power Users

Introduction

Creating Syslog entries and generating an alarm

Getting ready

How to do it...

How it works...

Backing up and erasing media, disks, and partitions with DD

Getting ready

How to do it...

How it works...

Creating graphics and presentations on the CLI

Getting ready

How to do it...

How it works...

Checking for file integrity and tampering

Getting ready

How to do it...

How it works...

Mounting network file systems and retrieving files

Getting ready

How to do it...

How it works...

Browsing the web from the CLI

Getting ready

How to do it...

How it works...

Capturing network traffic headlessly

Getting ready

How to do it...

How it works...

Finding binary dependencies

Getting ready

How to do it...

How it works...

Fetching time from different locations

Getting ready

How to do it...

How it works...

Encrypting/decrypting files from a script

Getting ready

How to do it...

How it works...

Writing Bash to Win and Profit

Introduction

Creating a lame utility HTTP server

Getting ready

How to do it…

How it works…

Parsing RSS feeds and output HTML

Getting ready

How to do it…

How it works…

Scraping the web and collecting files

Getting ready

How to do it…

How it works…

Making a simple IRC chat bot logger

Getting ready

How to do it…

How it works…

Blocking IP addresses from failed SSH attempts

Getting ready

How to do it…

How it works…

Playing and managing audio from Bash

Getting ready

How to do it…

How it works…

Creating a simple NAT and DMZ firewall

Getting ready

How to do it…

How it works…

Parsing a GitHub project and generate a report

Getting ready

How to do it…

How it works…

Creating a poor man's incremental remote backup

Getting ready

How to do it…

How it works…

Using Bash scripts to monitor udev input

Getting ready

How to do it…

How it works…

Using Bash to monitor battery life and optimize it

Getting ready

How to do it…

How it works…

Using chroot and restricted Bash shells to secure scripts

Getting ready

How to do it…

How it works…

Advanced Scripting Techniques

Introduction

Calculating and reducing the runtime of a script

Getting ready

How to do it...

How it works...

Writing one-line conditional statements and loops

Getting ready

How to do it...

How it works...

Avoiding command not found warnings/errors and improving portability

Getting ready

How to do it...

How it works...

Creating a config file and using it in tandem with your scripts

Getting ready

How to do it...

How it works...

Improving your shell – GCC and command line colors

Getting ready

How to do it...

How it works...

Adding aliases, and altering user paths/variables

Getting ready

How to do it...

How it works...

Echoing output to raw terminal devices

Getting ready

How to do it...

How it works...

Creating simple frontend GUIs for Bash scripts

Getting ready

How to do it...

How it works...

Compiling and installing your own Bash shell

Getting ready

How to do it...

How it works...

Recording terminal sessions for automation

Getting ready

How to do it...

How it works...

Writing high-quality scripts by example

Getting ready

How to do it...

How it works...

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部