#!/bin/ksh

#--------------------------------------------------------------------------
# Licensed Materials - Property of IBM
# 5724-C04
#
# (C) Copyright IBM Corporation 2006. All Rights Reserved.
# US Government Users Restricted Rights - Use, duplication
# or disclosure restricted by GSA ADP Schedule Contract
# with IBM Corp.
#--------------------------------------------------------------------------
#
# Description:
# Supporting functions to secureMain
#--------------------------------------------------------------------------

# Function to take a list of files and directories
# and return only the existing ones
returnExisting()
{
  result=""
  for file in $*
  do
    if [[ -a $file ]]
    then
      if [[ -z $result ]]
      then
        result=$file
      else
        result="$result $file"
      fi
    fi
  done
  print $result
}
