Bourne shell scripting tutorials
Bourne/bash shell script functions
contributed by Rex on August 5, 2004 under Bourne shell scriptingWriting functions can greatly simplify a program. If a chunk of code is used multiple times in different parts of a script, the code can be enclosed within a function and run using only the function name.
Bourne/bash shell script: while loop syntax
contributed by Rex on January 9, 2004 under Bourne shell scriptingA while loop allows execution of a code block an arbitrary number of times until a condition is met. This recipe describes the while loop syntax for the various Bourne shells (sh, ksh, bash, zsh, etc.) and provides examples.
Hide password entry in Bourne/bash shell script
contributed by Rex on December 15, 2003 under Bourne shell scriptingCommon practice for inputing passwords is to read the text without displaying it on the screen. The UNIX Bourne shell does not have this functionality as a command, but a combination of commands will make this work.
Bourne/bash shell script for loop syntax
contributed by Rex on October 29, 2003 under Bourne shell scriptingA for loop allows a program to iterate over a set of values. For loops in a Bourne shell script (sh, ksh, bash, zsh, etc.) are a useful means of iterating through files or other lists. This recipe describes the for loop syntax and provides some examples.
Bourne/bash shell scripts: case statement
contributed by Rex on October 22, 2003 under Bourne shell scriptingThe case statement is an elegant replacement for if/then/else if/else statements when making numerous comparisons. This recipe describes the case statement syntax for the Bourne shells (sh, ksh, bash, zsh, etc.).
Bourne/bash shell scripts: if statement syntax
contributed by Rex on October 20, 2003 under Bourne shell scriptingConditional expressions give programs life. The ability to branch makes shell scripts powerful. This recipe shows the basic if then else structure for sh, ksh, bash, zsh, etc.
Determine if a file is readable by current Bourne shell script user
contributed by Rex on under Bourne shell scriptingA well contructed shell script, like any good program, should handle error conditions gracefully. Checking if a file is readable before attempting to read it allows a script to branch instead of abort or display an error message.
RECENT POPULAR RECIPES
- Bourne/bash shell script: while loop syntax
- Bourne/bash shell scripts: string comparison
- bash shell script iterate through array values
- Bourne/bash shell scripts: case statement
- Determine if file exists in a Bourne/bash shell script
- Bourne/bash shell script for loop syntax
- Bourne/bash shell scripts: if statement syntax
- bash shell script declaring/creating arrays
- View our Top Tens
TECH-RECIPES BLOGS
- Symfony Propel 1.4: New Project Workflow
- quickie: video on adding 3G modem to a Thinkpad Tablet
- modding: adding 3G to my Lenovo Thinkpad Tablet
- quick look: Lenovo Thinkpad Tablet (Honeycomb) and Pen (pics)
- design: my geek lair
- How to Delete Your Twitter Account
- Flash Error May Slow Down OS X Lion
- Mass Effect: Cannot See Mouse Pointer






