View Single Post
  #2 (permalink)  
Old 05-07-2009, 07:38 PM
nixcraft's Avatar
nixcraft nixcraft is offline
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

If postfix_enable is defined AND NOT EMPTY, use postfix_enable value; otherwise, use "NO". Try it the following at terminal:
Code:
vech="BUS"
echo $vech
echo ${vech:="CAR"}
vech=""
echo ${vech:="CAR"}
if vech is not defined set its default value to CAR. line # 4 makes vech empty, thus default value set to car. This is known as parameter expansion. See bash man page for other fancy usage.
Code:
man bash
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
The Following User Says Thank You to nixcraft For This Useful Post:
raj (08-07-2009)