Get shell command return status / return code

Hello,

for everyone who wanted to know how to get the return code or status from an executed command in unix:

# for example use the ls command on a directory
ls -l /home

# get return code
echo $?

This returns an integer code as 0 or 1 or 127. Normally 0 means OK, 1 means ERROR and 127 means COMMAND NOT FOUND. Every command has its own return code but the 3 mentionned before are general.

Connecting a second mouse or keyboard directly to a Fusion virtual machine

Mice and keyboards belong to a special class of USB devices known as Human Interface Devices, or HID. Fusion does not allow these to be connected to the virtual machine by default, due to the risk of removing all human interface from the Mac. It is possible to instruct Fusion to make it possible to connect these devices by modifying the virtual machine settings.
 
Caution: You require access to a second keyboard and/or mouse for these steps. Do not follow these steps if you only have one mouse and/or keyboard, as you will not be able to use the device(s) with your Mac while Fusion is running.
 
To connect an external keyboard and/or mouse directly to your virtual machine:
  1. Shut down the virtual machine that needs the mouse/keyboard.
  2. Plug the second mouse/keyboard into your Mac.
  3. Edit your virtual machine's .vmx file using a text editor to include these lines:

    usb.generic.allowHID = "TRUE"
    usb.generic.allowLastHID = "TRUE"

    Note: For more information about editing the .vmx file,
    see Editing the .vmx file for your Fusion virtual machine (1014782).
     
  4. Power on your virtual machine.
  5. Go to Virtual Machine > USB and select Connect <your mouse or keyboard>.

source: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003418