I have the command below in a windows batch file, whenever I run the above batch (ipconfig.bat) to get the ip of my linux vm, it outputs the ip fine but doesn't ends the batch file, I have to press control + c and then press "y" to end the batch file. Even after adding @exit it doesn't exits.
VBoxManage --nologo guestcontrol execute "nixvm" "/root/scripts/ipconfig.sh" --username root --password mypassword --verbose --wait-for stdout
@exit
Any suggestions ?
The Bash Script (which gets executed by a windows batch file)
#!/bin/bash
echo "IP Address of "LinuxVM"
ifconfig eth0 | egrep '(inet addr|RX bytes|TX bytes)'
sleep 1s
#echo "MySQL Service Status"
service mysql status
chkconfig mysql --list
sleep 1s
#echo "Displaying MySQL DBs"
mysqlshow -uroot -pmypassword
Windows Batch File
VBoxManage --nologo guestcontrol execute "LinuxVM" "/root/scripts/ipconfig.sh" --username root --password password --verbose --wait-for stdout

VBoxManage.exe: The file '@exit' was not found on guest. If I remove the @exit it runs as expected. Can you post your ipconfig.sh script ? – Iain♦ Jan 22 '11 at 13:48ctrl + c- theipconfig.shwhich is in/root/scripts/ipconfig.shonly hasifconfigafter the bin/bash. Basically, I want the command to run in a batch file via windows machine as it executes the script inside a linux vm and displays the output, it should END then instead of user input. Would you knwo the way to end this batch file ? Thanks Again ! – rihatum Jan 24 '11 at 7:57Exit code=0 (Status=2 [successfully terminated], Flags=0)and then I get the cmd prompt back again. – Iain♦ Jan 24 '11 at 9:35