
# File: ifthen4   ==========================================

if [ -f weather_data ]
then
   if [ -r weather_data -a -w weather_data ]	# Readable and writable. 
   then
      cat newdata >> weather_data			# Write to it.
      cat weather_data | more				# Read from it.
      echo "WARNING: weather_data is writable."
      echo "Someone may overwrite it."
   else
      echo "weather_data exists, but it is"
      echo "either not readable or not writable."
   fi
else
   echo "weather_data does not exist."
fi

