Shell Scripting: Expert Recipes for Linux, Bash, and moreA compendium of shell scripting recipes that can immediately be used, adjusted, and applied The shell is the primary way of communicating with the Unix and Linux systems, providing a direct way to program by automating simple-to-intermediate tasks. With this book, Linux expert Steve Parker shares a collection of shell scripting recipes that can be used as is or easily modified for a variety of environments or situations. The book covers shell programming, with a focus on Linux and the Bash shell; it provides credible, real-world relevance, as well as providing the flexible tools to get started immediately.
Come out of your shell and dive into this collection of tried and tested shell scripting recipes that you can start using right away! |
What people are saying - Write a review
We haven't found any reviews in the usual places.
Contents
THE HISTORY OF UNIX GNU AND LINUX | 3 |
GETTING STARTED | 15 |
CONTENTS | 26 |
VARIABLES | 33 |
WILDCARD EXPANSION | 67 |
CONDITIONAL EXECUTION | 83 |
FLOW CONTROL USING LOOPS | 111 |
VARIABLES CONTINUED | 139 |
printf | 335 |
shuf | 337 |
Card Dealer | 338 |
Travel Planner | 340 |
sort | 341 |
Sorting on Keys | 342 |
Sorting Log Files by Date and Time | 344 |
Sorting HumanReadable Numbers | 345 |
FUNCTIONS AND LIBRARIES | 161 |
ARRAYS | 199 |
PROCESSES | 219 |
CHOOSING AND USING SHELLS | 255 |
FILE MANIPULATION | 279 |
grep | 300 |
grep Regular Expressions | 301 |
split | 303 |
tee | 304 |
touch | 306 |
find | 307 |
findexec | 310 |
Summary | 313 |
TEXT MANIPULATION | 315 |
echo | 316 |
fmt | 320 |
head and tail | 323 |
World Cup | 324 |
0d | 331 |
pr | 334 |
tr | 346 |
uniq | 350 |
wc | 351 |
Summary | 352 |
TOOLS FOR SYSTEMS ADMINISTRATION | 353 |
date | 355 |
More Interesting Uses of date | 359 |
xxiv | 360 |
SHELL FEATURES | 409 |
Potential Pitfalls | 415 |
Postinstall Scripts | 421 |
SYSTEMS ADMINISTRATION | 427 |
xxvi | 449 |
PRESENTATION | 459 |
DATA STORAGE AND RETRIEVAL | 471 |
NUMBERS | 483 |
PROCESSES | 501 |
INTERNATIONALIZATION | 517 |
Common terms and phrases
alias aliases array associative arrays backslash bash shell Beatle bin/bash Bourne shell builtin bytes called chapter characters configuration Debian declan kernel default defined dev/null disk display double quotes echo echo echo filename echo funcl echo hello echo myvar error etc/hosts example executed exists exit feature field file file1 file2 filename filesystem final find first func2 function GLOBALVAR GNU/Linux goldie grep gzip hello world hosts input Intel Corporation interactive IP Address l/bin/bash Available LINENO Linux match md5sum Minix nohup Offline Online Online Online output package params.sh pgrep pidof ping readable regular expressions return code root root rw—rw—r shell builtin shell script shopt sleep steve 64 Jan steve steve 64 strace string syntax SysRq the_function tmp/testing uniquevar Unix unset variable Wed Jan 26 wget