Custom command patterns and !
WinSCP version 5.5.5
I was using the commander GUI to create a custom command to grep for a password in files within multiple directories.
I used this:
And then I think I killed our entire server by searching for a password with an exclamation point in it.
Can anyone verify whether or not the middle exclamation point in "!?pass!word?!" would be read as an exclamation point, or would winscp expand it into a file name unless it was escaped, or something else? Should I surround the search phrase by single quotes instead of double?
Also, can anyone clarify if !& expands to just selected files, or will it expand to a selected directory, too?
Thanks.
I was using the commander GUI to create a custom command to grep for a password in files within multiple directories.
I used this:
grep -H -r "!?Search for text:?!" * | cut -d: -f1 >> grep-!?Name of results file?!.txt
And then I think I killed our entire server by searching for a password with an exclamation point in it.
Can anyone verify whether or not the middle exclamation point in "!?pass!word?!" would be read as an exclamation point, or would winscp expand it into a file name unless it was escaped, or something else? Should I surround the search phrase by single quotes instead of double?
Also, can anyone clarify if !& expands to just selected files, or will it expand to a selected directory, too?
Thanks.