Voytek wrote:
How do I pass a parameter to a script,

Command line parameters to a script appear as $1, $2, $3 etc with $0 being the script name and $# being the number or arguments. It's common practise to do something like this at the beginning of the script,


  case $# in
  1)
    DOMAIN=$1
    ;;
  *)
    echo "Usage: $0 <domain.name>" 1>&2
    exit
    ;;
  esac

  if [ -s /home/$DOMAIN/logs/2004-access.log ]
  ...


HTH

P.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to