To round out the comments into an Answer,
grep -n
will search for the given expression in the given files or standard input, reporting the line number that matches were found on.
\"in$Ps\"
is the expression that grep is looking for. Since the double-quotes are quoted, they are part of the text that grep will search for. The $Ps
part is a little unclear to me, since the shell will try to interpret Ps
as a variable name.
If $Ps
is not set, then grep
will search for the text: "in"
.
If $Ps
is set, then the shell will replace that part of the expression with the value of $Ps
; for example, if Ps=42
, then grep
's expression will be: "in42"
.
If $Ps
is a value that contains whitespace, this will be split into words (as the expansion is unquoted) and it would break the command. The resulting string would also undergo filename globbing if any wildcard characters (such as *
) is present in $Ps
.
My best guess is that it's a reference to using PowerShell in VBScript.
As Stéphane said, the **
is an extended globbing syntax, which here is used twice, in order to pull up all of the files ending in .asp
and .js
from within the current directory as well as from subdirectories (recursively) as ones for grep
to search through. It is used by the shell, not by grep
.
Long story short, the code will display file names and corresponding line numbers for lines that match \"in\"
, where in
is followed by whatever value $Ps
holds.
zsh
recursive globbing now supported by a few other shells – Stéphane Chazelas Feb 24 '15 at 21:41mod_mono
. – jordanm Feb 24 '15 at 23:18