Bourne shell scripting tutorials
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.
CommentsHide 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.
CommentsBourne/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.
CommentsBourne/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.).
CommentsBourne/bash shell scripts: string comparison
Contributed by Rex on October 21, 2003 under Bourne shell scripting CommentsBourne/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.
CommentsDetermine 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.
CommentsPOPULAR RECIPES
- Bourne/bash shell script: while loop syntax
- Bourne/bash shell scripts: case statement
- bash shell script iterate through array values
- Bourne/bash shell scripts: string comparison
- Bourne/bash shell script for loop syntax
- Bourne/bash shell scripts: if statement syntax
- Determine if file exists in a Bourne/bash shell script
- bash shell script declaring/creating arrays
- View our Top Tens
TECH-RECIPES BLOGS
- you're doing it wrong! (rant)
- thoughts of a launch psp owner (post 4 1/2 years)
- Facebook FishVille Cheat: Send Multiple Free Gifts to Your Neighbors
- post release: Windows 7, homegroups and me
- fall 2009 and some geek thoughts, reflections
- Facebook Cafe World Cheat: Close Your Cafe When You are Away for Long Periods of Time (to preserve your Buzz Rating)
- Facebook Cafe World Cheat: Serve Your Customers Instantly
- Facebook Cafe World Cheat: Send Multiple Free Gifts to Your Neighbors








