#!/bin/sh # First check if this variable is already set # then if not set, check it (maybe), then set it if [ -z "$NEWS" ] ; then var=val fi export NEWS .