Following on Geekology’s previous posts on Regular expressions (Regex Overview and Regex in PHP), the following is a list of regular expression examples for general use.

Regex can be used to search for simple or extremely complex patterns through blocks of text, and most programming languages and tools can interpret and use it.

URL shortening services usually require that you use their APIs or websites, but it’s relatively simple to build command line Bash scripts that interface with them.

If you need to see a tree view of files and directories from the current directory, you can do so by piping the output from “ls” into “grep”, then piping the results into “sed”.

If you’d like to rerun a Bash command with a different set of arguments without retyping it, you can use the “!!:gs” syntax detailed in this post.

 

Facebook Fan Page

categories

 



Copyright © 2010

Geekology is proudly powered by WordPress
Geekology Theme designed by:
Artificial Studio

Afrigator