PowerShell常用的轉義符、比較符、邏輯操作符

来源:互联网 发布:app软件大全 编辑:程序博客网 时间:2024/04/30 12:32

轉義符

`b

Backspace,顯示時將前一個字符覆蓋

`f

分頁符,打印時分頁

`t

水平製表符

`v

垂直製表符

`r

回車符

`n

換行符

‘’

一個單引號,在單引號字符中(literal string)

""

一個雙引號,在雙引號字符中(expanding string)


比較符

-lt

Less than

-le

Less than or equal to

-gt

Greater than

-ge

Greater than or equal to

-eq

Equal to

-ne

Not equal to

-like

Like (uses wildcards for matching)

-notlike

Not like (uses wildcards for matching)

-in

$value -in  $list

-notin

 

-contains

$list -contains  $value

-notcontains

 

-match

Reglure Expression Match

-notmatch

 


邏輯操作符

-and

-or

-xor

異或

-not

!


其他操作符(針對字符串)

-replace

替換,支持正則表達式

-split

拆分,支持正則表達式

-join

合併

-f

"Format String" -f  Values,與C#String.Format類似



0 0
原创粉丝点击