Note - This is still BETA, it hasn't been tested on that many systems.
Type either 1 or 2 depending on choice wanted.
All credit goes to user Deve on Nvidia developer forum; https://devtalk.nvidia.com/default/topic/705993/easy-switch-between-bumblebee-and-nvidia-prime/
Ubuntu 14.04 running XFCE with nvidia-331-updates Ubuntu 14.04 running XFCE with nvidia-346
Please test for other versions, this script would be trivial to support Debian and other GUI's.