A simple script that will freeze, or unfreeze, all procceses except for itself and the supplied ones.
Please note that using {1..someLargeNumber} will slow this script down if said number is large.
Usage is: "./FreezeX.sh 1 2 3 4", where 1,2,3 and 4 are the supplied PIDs
Set $1 to "-1" to, instead of freezing all but the supplied processes, unfreeze all but the supplied processes.
Freeze all proccesses but the process with PID 45./FreezeX.sh 45
Freeze all proccesses but the processes with PID 45, 67 and 839./FreezeX.sh 45 67 839
Unfreeze all proccesses but the processes with PID 45, 67 and 839./FreezeX.sh -1 45 67 839
Freeze no procceses below 500./FreezeX {1..500}
Freeze everything except Terminal./FreezeX $(pgrep Terminal)
Freeze nothing (Why would anyone do this though?)./FreezeX $(ps -A -o pid)