Shell Scripting

From Www

My note about shell scripting.  Mostly this is just a reference to stuff I forget about shell scripting.


If you need more info about shell scripting I would highly suggest O'Reilly Books (http://www.ora.com)

    Some of this info I learned from "Linux in a Nutshell" (http://www.oreilly.com/catalog/linuxnut5/) also "Unix in a Nutshell" (http://www.oreilly.com/catalog/unixnut4/) books, the "bash Cookbook" (http://www.oreilly.com/catalog/9780596526788/) also looks good ?

Variable Substitution/Pattern Matching


${variable#pattern} if pattern matches the begining of the var's value delete the shortest part that matches
${variable##pattern} if pattern matches the begining of the var's value delete the longest part that matches
${variable%pattern}

if pattern matches the end of the var's value delete the shortest part that matches

${variable%%pattern}

if pattern matches the end of the var's value delete the longest part that matches







Files (0)
 

Retrieved from "http://www.penguinsunbound.com/User:Goeko/Shell_Scripting"

Accessed 326 times.This page was last modified 19:27, 5 Aug 2007



Running DekiWiki-stable.