Updated shell script to run with -i flag.