`export EDITOR=$(which rm)`
$( ) is a bash-ism (Command Substitution ) which says, “Execute the command within the parenthesis, and replace the command with the output”.
In this case, it executes the
which rm command, that returns the full path to where the
rm utility is. Then it sets the EDITOR environment variable to that.
The end result is, when you call a utility which uses the EDITOR variable (visudo, vipw, etc), you delete the file you’re trying to edit.