GNU extensions aren't just dumb, they introduce a security vulnerabilities
On a POSIX system, this is totally safe:
grep -e foobar "$userdata" /path/to/file
Because the first non-option argument (foobar) disables further option processing in same way -- does. On GNU, if $userdata is "-f/etc/passwd", well, you've fucked up.