I have installed strawberry-perl on my windows 7 laptop.
I want to search for a list of words using grep
or ack
on windows.
I have been able to perform basic searches using ack, but I just don't know how to pass a list of words to ack
So I want to pass a list of words to ack and find out the line numbers where these words occur. Both words do not have to occur on the same line.
For example, if I am searching for "doll" and "house", I could have doll on line 12 and house on line 244.
I tried something like this ack "doll"|"house"
but it throws the following error.
Expressions are only allowed as the first element of a pipeline.
At line:1 char:22
+ ack "doll" | "house" <<<<
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExpressionsMustBeFirstInPipeline