What is Bash?
Bash is the shell, or command language interpreter, for the gnu operating system. The name is an acronym for the ‘Bourne-Again SHell’, a pun on Stephen Bourne, the author of the direct ancestor of the current Unix shell sh, which appeared in the Seventh Edition Bell Labs Research version of Unix. Bash is largely compatible with sh and incorporates useful features from the Korn shell ksh and the C shell csh. It is intended to be a conformant implementation of the ieee posix Shell and Tools portion of the ieee posix specification (ieee Standard 1003.1). It offers functional improvements over sh for both interactive and programming use. While the gnu operating system provides other shells, including a version of csh, Bash is the default shell. Like other gnu software, Bash is quite portable. It currently runs on nearly every version of Unix and a few other operating systems − independently-supported ports exist for ms-dos, os/2, and Windows platforms.
However, Do you write bash shell? If not, but want to begin, I mention Great Bash (Video) By Carl Albing (He writes software for some of the biggest and fastest computers in the world. A software engineer for Cray, Inc. and an independent consultant, he is comfortable programming with C, Java, bash and much more. Carl is the coauthor of two books, one on Java development on Linux and his latest, the O'Reilly "bash Cookbook").
Great Bash will teach you the fundamentals of bash shell programming, beginning with simple shell scripts and progressing to complex, automated system administration and file management tasks. You'll also get a firm handle on control structures and the decision-making abilities of the bash environment. By the time you're done, you'll have written more than twenty complex shell scripts, and interacted with the rest of your file system.
What we learn from Great Bash (Video):
"Writing Your First Scripts"
Scripting begins with whatever you do on the command line. Learn the basics of shell commands and I/O redirection, make a simple script and begin to use bash to put more power at your fingertips.
"Making Decisions in Bash"
Scripting is more than just running a fixed list of commands; it involves decision points and branching. Learn the simple if/then/else command, but also some of the other ways that bash can branch on success or failure of commands in your scripts.
Every programming language needs variables. See how to get and set values, how to print them out simply or with formatting. Learn to use a powerful set of operators to modify bash string variables as you retrieve their values, to make for compact, powerful expressions.
We will learn simple shell script and It's useful for shell script programming Idea.
Log Buffer #399, A Carnival of the Vanities for DBAs
12 hours ago