comparing the two answers given so far, i started with @TheMadTechnician's because it uses fewer pipes-- typing a pipe on a US keyboard requires pressing the SHIFT key, so fewer pipes = fewer SHIFTs = fewer keystrokes.
Then i removed the *
from the ls
command, that's unnecessary.
Like @Rachel Duncan's answer, i converted all commands and switches to lowercase, they don't need to be uppercase-- that eliminates more SHIFT presses.
And i removed all spaces surrounding the pipes, they are unnecessary
@Rachel Duncan: 46 chars, 3 SHIFTS
ls -r | sls 'some string' | % path | select -u
@The Mad Technician: 45 chars, 6 SHIFTS
ls * -r | sls 'pattern' | Select -Exp Path -U
@Johny Why: 40 chars, 2 SHIFTS
ls -r|sls 'textarea'|select -exp path -u
Still, this seems like it should be easier yet. Before i mark Solved, can anyone offer a yet terser method?
Perhaps using Windows command-line, instead of powershell? (tho', i guess technically that would not answer the question, because i specified using powershell. Maybe stack would allow a command-line solution in the comments? :)