Posts tagged Bash

Bash Co-Processes

One of the new features in bash 4.0 is the coproc statement.
The coproc statement allows you to create a co-process that
is connected to the invoking shell via two pipes: one to send
input to the co-process and one to get output from the co-process. more>>



View full post on HOW-TOs

Pro Bash Programming: Scripting the GNU/Linux Shell

Product Description
The bash shell is a complete programming language, not merely a glue to combine external Linux commands. By taking full advantage of shell internals, shell programs can perform as snappily as utilities written in C or other compiled languages. And you will see how, without assuming Unix lore, you can write professional bash 4.0 programs through standard programming techniques. Complete bash coverage Teaches bash as a programming language Helps you m… More >>

Pro Bash Programming: Scripting the GNU/Linux Shell

Bash Redirections Using Exec

If you’ve used the command line much at all you know about I/O redirection
for redirecting input to and/or output from a program.
What you don’t see all that often or that you may not be familiar
with is redirecting I/O inside a bash script.
And I’m not talking about redirections that you use when
your script executes another command, I’m talking about redirecting
your script’s I/O once it has already started executing. more>>



View full post on HOW-TOs

Linux Shell Scripting with Bash

Product Description
With the proliferation of Linux as both a server and desktop operating system, users are looking for more advanced methods of getting up and running quickly and efficiently solving problems. The most powerful way of achieving this is to employ the command line interface known as the shell. Bash, the Bourne Again Shell, is the most popular Linux shell today.Linux Shell Scripting with Bash emphasizes professional scripting solutions through the use of structured pro… More >>

Linux Shell Scripting with Bash

Tech Tip: Dereference Variable Names Inside Bash Functions

Bash shell

We often read (including in the book
Advanced Bash-Scripting Guide by Mendel Cooper)
that if we pass variable names as parameters to functions,
they will be treated as string literals and cannot be dereferenced
(ie the value is not available). But this is not so, variable names
can be passed as parameters to functions and they can be
dereferenced to obtain the value of the variable with the given name.
more>>



View full post on HOW-TOs