background preloader

Bash

Facebook Twitter

Bash Reference Manual. The Comprehensive List of bash Reference Documentation and Examples. Bash Prompts.

Scripting

GNU Bash Reference Manual - Table of Contents. This text is a brief description of the features that are present in the Bash shell (version 3.2, 28 September 2006). This is Edition 3.2, last updated 28 September 2006, of The GNU Bash Reference Manual, for Bash, Version 3.2. Bash contains features that appear in other popular shells, and some features that only appear in Bash. Some of the shells that Bash has borrowed concepts from are the Bourne Shell (‘sh’), the Korn Shell (‘ksh’), and the C-shell (‘csh’ and its successor, ‘tcsh’). The following menu breaks the features up into categories based upon which one of these other shells inspired the feature. This manual is meant as a brief introduction to features found in Bash. The Bash manual page should be used as the definitive reference on shell behavior. This text is a brief description of the features that are present in the Bash shell (version 3.2, 28 September 2006). Bash Tips And Tricks From My Own Experience - Several Instalments.

Instalment 2:- How I use POSIX utilities to process text One of the problems I have very often is that I would like to extract usable links from a very large web page the source code of which looks messy (when I look at it using "View Source").Have you ever looked at a cool web page with nice visual effects and the first thing that comes to your mind is "How did he do that?

I would also like to have those effects on my own site. "Or otherwise the page has lots of links to pretty pictures and you just want the links without the other "fat".And you go to view the source and it looks like this: Now you want to make some sense out of that never ending HTML string.You probably already have your favorite tool handy to do that easily, and that's fine, but my objective here is to showcase the use of POSIX utilities, that's why I will show you what might look like the hard way of doing it.

For simplicity, I will assume that the above HTML code is stored in file messyHTML.html. OK, so what did I do? Bash commands - Linux MAN Pages. Advanced Bash-Scripting Guide. Bash Guide for Beginners. Bash commands - Linux MAN Pages. Using Bash's History Effectively. Using Bash's History Effectively I will attempt here to focus on only one feature of Bash, its command history. There are other good documents on the other features of Bash. If you're interested in anything other than the command history/recall, then this document really isn't going to fulfill your needs.

Okay, so let's get into it! What is Bash? "Descended from the Bourne Shell, Bash is a GNU product, the "Bourne Again SHell. " So, Bash is GNU software and all that that implies (GPL, free, reliable, etc.). The last feature mentioned as one of the major selling points of Bash is "recall". While completion (feature #2) alleviates much of the pain associated with entering long commands and deserves an entire presentation unto itself (stay tuned), completion also adds to the problem in a way, by making longer commands more acceptable.

There's also the advent of long options, prevalent in the GNU world. So, we have this problem where command lines can get very long. Try it out.