On Mon, Aug 27, 2018 at 11:20:42AM -0400, Roberto C. Sánchez wrote: > env |grep [-]g
Fails if there is a file named -g in the current directory, as that matches the unquoted glob and causes it to expand. Also fails if failglob is turned on, whether the file exists or not (fails differently in the two cases). Also fails if nullglob is turned on, but that is definitely not recommended in interactive shells.