SØG - mellem flere end 8 millioner bøger:

Søg på: Titel, forfatter, forlag - gerne i kombination.
Eller blot på isbn, hvis du kender dette.

Viser: Bash Cookbook - Solutions and Examples for Bash Users

Bash Cookbook - Solutions and Examples for Bash Users

Bash Cookbook

Solutions and Examples for Bash Users
Carl Albing Ph. D., J P Vossen og Cameron Newham
(2007)
Sprog: Engelsk
O'Reilly Media, Incorporated
453,00 kr.
Denne titel er udgået og kan derfor ikke bestilles. Vi beklager.

Detaljer om varen

  • Paperback: 630 sider
  • Udgiver: O'Reilly Media, Incorporated (Juni 2007)
  • Forfattere: Carl Albing Ph. D., J P Vossen og Cameron Newham
  • ISBN: 9780596526788

The key to mastering any Unix system, especially Linux and Mac OS X, is a thorough knowledge of shell scripting. Scripting is a way to harness and customize the power of any Unix system, and it's an essential skill for any Unix users, including system administrators and professional OS X developers. But beneath this simple promise lies a treacherous ocean of variations in Unix commands and standards.

bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages. Packed full of useful scripts, along with examples that explain how to create better scripts, this new cookbook gives professionals and power users everything they need to automate routine tasks and enable them to truly manage their systems -- rather than have their systems manage them.

Preface; Who Should Read This Book; About This Book; Conventions Used in This Book; Using Code Examples; We''d Like to Hear from You; Safari® Enabled; Acknowledgments;
Chapter 1: Beginning bash; 0 Why bash?; 0 The bash Shell;
1.1 Decoding the Prompt;
1.2 Showing Where You Are;
1.3 Finding and Running Commands;
1.4 Getting Information About Files;
1.5 Showing All Hidden (dot) Files in the Current Directory;
1.6 Using Shell Quoting;
1.7 Using or Replacing Built-ins and External Commands;
1.8 Determining If You Are Running Interactively;
1.9 Setting bash As Your Default Shell;
1.10 Getting bash for Linux;
1.11 Getting bash for xBSD;
1.12 Getting bash for Mac OS X;
1.13 Getting bash for Unix;
1.14 Getting bash for Windows;
1.15 Getting bash Without Getting bash;
1.16 Learning More About bash Documentation;
Chapter 2: Standard Output;
2.1 Writing Output to the Terminal/Window;
2.2 Writing Output but Preserving Spacing;
2.3 Writing Output with More Formatting Control;
2.4 Writing Output Without the Newline;
2.5 Saving Output from a Command;
2.6 Saving Output to Other Files;
2.7 Saving Output from the ls Command;
2.8 Sending Both Output and Error Messages to Different Files;
2.9 Sending Both Output and Error Messages to the Same File;
2.10 Appending Rather Than Clobbering Output;
2.11 Using Just the Beginning or End of a File;
2.12 Skipping a Header in a File;
2.13 Throwing Output Away;
2.14 Saving or Grouping Output from Several Commands;
2.15 Connecting Two Programs by Using Output As Input;
2.16 Saving a Copy of Output Even While Using It As Input;
2.17 Connecting Two Programs by Using Output As Arguments;
2.18 Using Multiple Redirects on One Line;
2.19 Saving Output When Redirect Doesn''t Seem to Work;
2.20 Swapping STDERR and STDOUT;
2.21 Keeping Files Safe from Accidental Overwriting;
2.22 Clobbering a File on Purpose;
Chapter 3: Standard Input;
3.1 Getting Input from a File;
3.2 Keeping Your Data with Your Script;
3.3 Preventing Weird Behavior in a Here-Document;
3.4 Indenting Here-Documents;
3.5 Getting User Input;
3.6 Getting Yes or No Input;
3.7 Selecting from a List of Options;
3.8 Prompting for a Password;
Chapter 4: Executing Commands;
4.1 Running Any Executable;
4.2 Telling If a Command Succeeded or Not;
4.3 Running Several Commands in Sequence;
4.4 Running Several Commands All at Once;
4.5 Deciding Whether a Command Succeeds;
4.6 Using Fewer if Statements;
4.7 Running Long Jobs Unattended;
4.8 Displaying Error Messages When Failures Occur;
4.9 Running Commands from a Variable;
4.10 Running All Scripts in a Directory;
Chapter 5: Basic Scripting: Shell Variables;
5.1 Documenting Your Script;
5.2 Embedding Documentation in Shell Scripts;
5.3 Promoting Script Readability;
5.4 Separating Variable Names from Surrounding Text;
5.5 Exporting Variables;
5.6 Seeing All Variable Values;
5.7 Using Parameters in a Shell Script;
5.8 Looping Over Arguments Passed to a Script;
5.9 Handling Parameters with Blanks;
5.10 Handling Lists of Parameters with Blanks;
5.11 Counting Arguments;
5.12 Consuming Arguments;
5.13 Getting Default Values;
5.14 Setting Default Values;
5.15 Using null As a Valid Default Value;
5.16 Using More Than Just a Constant String for Default;
5.17 Giving an Error Message for Unset Parameters;
5.18 Changing Pieces of a String;
5.19 Using Array Variables;
Chapter 6: Shell Logic and Arithmetic;
6.1 Doing Arithmetic in Your Shell Script;
6.2 Branching on Conditions;
6.3 Testing for File Characteristics;
6.4 Testing for More Than One Thing;
6.5 Testing for String Characteristics;
6.6 Testing for Equal;
6.7 Testing with Pattern Matches;
6.8 Testing with Regular Expressions;
6.9 Changing Behavior with Redirections;
6.10 Looping for a While;
6.11 Looping with a read;
6.12 Looping with a Count;
6.13 Looping with Floating-Point Values;
6.14 Branching Many Ways;
6.15 Parsing Command-Line Arguments;
6.16 Creating Simple Menus;
6.17 Changing the Prompt on Simple Menus;
6.18 Creating a Simple RPN Calculator;
6.19 Creating a Command-Line Calculator;
Chapter 7: Intermediate Shell Tools I;
7.1 Sifting Through Files for a String;
7.2 Getting Just the Filename from a Search;
7.3 Getting a Simple True/False from a Search;
7.4 Searching for Text While Ignoring Case;
7.5 Doing a Search in a Pipeline;
7.6 Paring Down What the Search Finds;
7.7 Searching with More Complex Patterns;
7.8 Searching for an SSN;
7.9 Grepping Compressed Files;
7.10 Keeping Some Output, Discarding the Rest;
7.11 Keeping Only a Portion of a Line of Output;
7.12 Reversing the Words on Each Line;
7.13 Summing a List of Numbers;
7.14 Counting String Values;
7.15 Showing Data As a Quick and Easy Histogram;
7.16 Showing a Paragraph of Text After a Found Phrase;
Chapter 8: Intermediate Shell Tools II;
8.1 Sorting Your Output;
8.2 Sorting Numbers;
8.3 Sorting IP Addresses;
8.4 Cutting Out Parts of Your Output;
8.5 Removing Duplicate Lines;
8.6 Compressing Files;
8.7 Uncompressing Files;
8.8 Checking a tar Archive for Unique Directories;
8.9 Translating Characters;
8.10 Converting Uppercase to Lowercase;
8.11 Converting DOS Files to Linux Format;
8.12 Removing Smart Quotes;
8.13 Counting Lines, Words, or Characters in a File;
8.14 Rewrapping Paragraphs;
8.15 Doing More with less;
Chapter 9: Finding Files: find, locate, slocate;
9.1 Finding All Your MP3 Files;
9.2 Handling Filenames Containing Odd Characters;
9.3 Speeding Up Operations on Found Files;
9.4 Finding Files Across Symbolic Links;
9.5 Finding Files Irrespective of Case;
9.6 Finding Files by Date;
9.7 Finding Files by Type;
9.8 Finding Files by Size;
9.9 Finding Files by Content;
9.10 Finding Existing Files and Content Fast;
9.11 Finding a File Using a List of Possible Locations;
Chapter 10: Additional Features for Scripting;
10.1 "Daemon-izing" Your Script;
10.2 Reusing Code with Includes and Sourcing;
10.3 Using Configuration Files in a Script;
10.4 Defining Functions;
10.5 Using Functions: Parameters and Return Values;
10.6 Trapping Interrupts;
10.7 Redefining Commands with alias;
10.8 Avoiding Aliases, Functions;
Chapter 11: Working with Dates and Times;
11.1 Formatting Dates for Display;
11.2 Supplying a Default Date;
11.3 Automating Date Ranges;
11.4 Converting Dates and Times to Epoch Seconds;
11.5 Converting Epoch Seconds to Dates and Times;
11.6 Getting Yesterday or Tomorrow with Perl;
11.7 Figuring Out Date and Time Arithmetic;
11.8 Handling Time Zones, Daylight Saving Time, and Leap Years;
11.9 Using date and cron to Run a Script on the Nth Day;
Chapter 12: End-User Tasks As Shell Scripts;
12.1 Starting Simple by Printing Dashes;
12.2 Viewing Photos in an Album;
12.3 Loading Your MP3 Player;
12.4 Burning a CD;
12.5 Comparing Two Documents;
Chapter 13: Parsing and Similar Tasks;
13.1 Parsing Arguments for Your Shell Script;
13.2 Parsing Arguments with Your Own Error Messages;
13.3 Parsing Some HTML;
13.4 Parsing Output into an Array;
13.5 Parsing Output with a Function Call;
13.6 Parsing Text with a read Statement;
13.7 Parsing with read into an Array;
13.8 Getting Your Plurals Right;
13.9 Taking It One Character at a Time;
13.10 Cleaning Up an SVN Source Tree;
13.11 Setting Up a Database with MySQL;
13.12 Isolating Specific Fields in Data;
13.13 Updating Specific Fields in Data Files;
13.14 Trimming Whitespace;
13.15 Compressing Whitespace;
13.16 Processing Fixed-Length Records;
13.17 Processing Files with No Line Breaks;
13.18 Converting a Data File to CSV;
13.19 Parsing a CSV Data File;
Chapter 14: Writing Secure Shell Scripts;
14.1 Avoiding Common Security Problems;
14.2 Avoiding Interpreter Spoofing;
14.3 Setting a Secure $PATH;
14.4 Clearing All Aliases;
14.5 Clearing the Command Hash;
14.6 Preventing Core Dumps;
14.7 Setting a Secure $IFS;
14.8 Setting a Secure umask;
14.9 Finding World-Writable Directories in Your $PATH;
14.10 Adding the Current Directory to the $PATH;
14.11 Using Secure Temporary Files;
14.12 Validating Input;
14.13 Setting Permissions;
14.14 Leaking Passwords into the Process List;
14.15 Writing setuid or setgid Scripts;
14.16 Restricting Guest Users;
14.17 Using chroot Jails;
14.18 Running As a Non-root User;
14.19 Using sudo More Securely;
14.20 Using Passwords in Scripts;
14.21 Using SSH Without a Password;
14.22 Restricting SSH Commands;
14.23 Disconnecting Inactive Sessions;
Chapter 15: Advanced Scripting;
15.1 Finding bash Portably for #!;
15.2 Setting a POSIX $PATH;
15.3 Developing Portable Shell Scripts;
15.4 Testing Scripts in VMware;
15.5 Using for Loops Portably;
15.6 Using echo Portably;
15.7 Splitting Output Only When Necessary;
15.8 Viewing Output in Hex;
15.9 Using bash Net-Redirection;
15.10 Finding My IP Address;
15.11 Getting Input from Another Machine;
15.12 Redirecting Output for the Life of a Script;
15.13 Working Around "argument list too long" Errors;
15.14 Logging to syslog from Your Script;
15.15 Sending Email from Your Script;
15.16 Automating a Process Using Phases;
Chapter 16: Configuring and Customizing bash;
16.1 bash Startup Options;
16.2 Customizing Your Prompt;
16.3 Change Your $PATH Permanently;
16.4 Change Your $PATH Temporarily;
16.5 Setting Your $CDPATH;
16.6 Shortening or Changing Command Names;
16.7 Adjusting Shell Behavior and Environment;
16.8 Adjusting readline Behavior Using
.inputrc;
16.9 Keeping a Private Stash of Utilities by Adding ~/bin;
16.10 Using Secondary Prompts: $PS2, $PS3, $PS4;
16.11 Synchronizing Shell History Between Sessions;
16.12 Setting Shell History Options; 13 Creating a Better cd Command;
16.14 Creating and Changing into a New Directory in One Step;
16.15 Getting to the Bottom of Things;
16.16 Adding New Features to bash Using Loadable Built-ins;
16.17 Improving Programmable Completion;
16.18 Using Initialization Files Correctly;
16.19 Creating Self-Contained, Portable RC Files;
16.20 Getting Started with a Custom Configuration;
Chapter 17: Housekeeping and Administrative Tasks;
17.1 Renaming Many Files;
17.2 Using GNU Texinfo and Info on Linux;
17.3 Unzipping Many ZIP Files;
17.4 Recovering Disconnected Sess
De oplyste priser er inkl. moms

Senest sete

Polyteknisk Boghandel

har gennem mere end 50 år været studieboghandlen på DTU og en af Danmarks førende specialister i faglitteratur.

 

Vi lagerfører et bredt udvalg af bøger, ikke bare inden for videnskab og teknik, men også f.eks. ledelse, IT og meget andet.

Læs mere her


Trykt eller digital bog?

Ud over trykte bøger tilbyder vi tre forskellige typer af digitale bøger:

 

Vital Source Bookshelf: En velfungerende ebogsplatform, hvor bogen downloades til din computer og/eller mobile enhed.

 

Du skal bruge den gratis Bookshelf software til at læse læse bøgerne - der er indbygget gode værktøjer til f.eks. søgning, overstregning, notetagning mv. I langt de fleste tilfælde vil du samtidig have en sideløbende 1825 dages online adgang. Læs mere om Vital Source bøger

 

Levering: I forbindelse med købet opretter du et login. Når du har installeret Bookshelf softwaren, logger du blot ind og din bog downloades automatisk.

 

 

Adobe ebog: Dette er Adobe DRM ebøger som downloades til din lokale computer eller mobil enhed.

 

For at læse bøgerne kræves særlig software, som understøtter denne type. Softwaren er gratis, men du bør sikre at du har rettigheder til installere software på den maskine du påtænker at anvende den på. Læs mere om Adobe DRM bøger

 

Levering: Et download link sendes pr email umiddelbart efter købet.

 


Ibog: Dette er en online bog som kan læses på udgiverens website. 

Der kræves ikke særlig software, bogen læses i en almindelig browser.

 

Levering: Vores medarbejder sender dig en adgangsnøgle pr email.

 

Vi gør opmærksom på at der ikke er retur/fortrydelsesret på digitale varer.