sudo(8) %2Fpath%2Fto%2Fmasscan%2Fbin%2Fmasscan %24%28dig %2Bshort example.com %7C rgrep.1 -oE %22%5Cb%28%5B0-9%5D%7B1%2C3%7D%5C.%29%7B3%7D%5B0-9%5D%7B1%2C3%7D%5Cb%22 %7C head -1%29 -p0-10001 --rate 1000 --wait 3 2%3E %2Fdev%2Fnull %7C grep -o -P %27%28%3F%3C%3Dport %29.*%28%3F%3D%2F%29%27
execute a command as another user
sudo allows a permitted user to execute a command as the superuser or another user, as specified by the
security policy.  The real and effective uid and gid are set to match those of the target user, as
specified in the password database, and the group vector is initialized based on the group database
(unless the -P option was specified).
print lines matching a pattern
-o, --only-matching
       Print  only  the  matched  (non-empty) parts of a matching line, with each such part on a separate
       output line.
    -P, --perl-regexp
           Interpret PATTERN as a Perl regular expression (PCRE, see below).  This is highly experimental and
           grep -P may warn of unimplemented features.

Matching Control
    -e PATTERN, --regexp=PATTERN
           Use PATTERN as the pattern.  This can be used to specify multiple search patterns, or to protect a
           pattern beginning with a hyphen (-).  (-e is specified by POSIX.)
source manpages: sudorgrep