#!/bin/sh

# This is the unix version.  house.bat is the dos version

# Use this run mh commands from a command prompt or other programs
# For example:
#    house speak hi there
#    house display c:\autoexec.bat
#    house Turn the backyard light on
#    house XAJAK


# Make sure xcmd_file matches with the mh.ini parm
cmd_file=/tmp/house_cmd.txt
if ([ -n "$mh_parms" ] && (test -e $mh_parms))
  then
    if grep "^xcmd_file" $mh_parms > /dev/null
      then
        cmd_file=`grep "^xcmd_file" $mh_parms | awk '{print $3}'`
    fi
fi

echo $* > $cmd_file
