Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Wildcards in switch strings

$
0
0

Hi,

I have got some trouble with the switch statement because I have to check log statements from a logfile.

The statements could be for example:

cvs [update aborted]: no such user XYZ
cvs update: cannot open XYZ
cvs update: No CVSROOT specified!

but also…

? XYZ
U XYZ
M XYZ
R XYZ

In the real logfile XYZ is changed by a file- or directory name.

I'm looking for a simple switch statement for checking the logfile string. My problem is the wildcard symbol "?" that is included in one logfile statement. When I use the -wildcard option for the last 4 examples are the same for powershell.

Do you have any ideas for me?

Thanks


Viewing all articles
Browse latest Browse all 13067

Latest Images

Trending Articles



Latest Images