i love simulator

if you interested in , i wrote a script to lauch the simulator
main features :
- retreive the executable from anywhere you are (you have to put the script in the path)
- generate a log (in the current dir) if you wish it throught an interactive question
- avoid Ctrl-C to be intercepted by the shell (replaced by Crtrl-A as explain in the paper)
- let you specify additionnal arguments as the original command maytag.L supports
--- warning : several text in french but hopfully w/out accent

the script :
<<
#! /bin/bash
# author : me me me
# version : final alfa release

echo "-- wrapper maytag.L"

old_stty=$(stty -g)
stty -icanon time 1 min 0 -echo
    letest=""
    echo -n "** generer le log lasimontap.log ? [oy/N] "
    while [ -z "$letest" ]; do
        read letest
    done
    MYLOG=""
    if ([ "$letest" = "o" ] || [ "$letest" = "y" ]); then
        echo $letest
        echo -e "-- log sauve dans $PWD/lasimontap.log (mode append)\n"
        echo -e "\n** lasimontap.log du `date`\n" >> $PWD/lasimontap.log
        MYLOG="| tee $PWD/lasimontap.log"
    else
        echo $letest
        echo -e "-- log non sauve\n"
    fi
stty $old_stty

old_stty=$(stty -g)
stty intr ^a
    cd /mnt/nac/home/Netapp/Simulator/sim
    echo -e "** execution de /mnt/nac/home/Netapp/Simulator/sim/maytag.L -qf $@\n"
    eval "/mnt/nac/home/Netapp/Simulator/sim/maytag.L -qf $@ $MYLOG"
stty $old_stty

trap "stty $old_stty" KILL QUIT EXIT

>>

WARNING : this only work on linux
(for linux, you could perhaps try to install cygwin and see if simulator works on it)

enjoy

Dave Hitz wrote:
On Jun 19, Merkin, David S wrote:
  
Does this work on different OS's other than Linux?
Can the Simulater be installed on XP?
    

For now: Linux.

Dave

  

-- 
-- jetez un oeil ici http://www.sensiva.com/ --
--  have a look here http://www.sensiva.com/ --