以下是Centos 7上运行powershell,安装的版本为v6.0.0-alpha.12
[root@bogon ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
[root@bogon ~]# powershell
PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS /root> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-alpha
PSEdition Core
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.12
CLRVersion
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS /root/shell> (Get-Command -CommandType Cmdlet).count #共有213个cmdlet
213示例:
统计一个文件共有多少行
PS /root/shell> Get-Content ./tecmint_monitor.sh | Measure-Object Count : 117 Average : Sum : Maximum : Minimum : Property :
linux
windows
本文出自 “赵东伟的博客” 博客,请务必保留此出处http://zhaodongwei.blog.51cto.com/4233742/1884338
原文:http://zhaodongwei.blog.51cto.com/4233742/1884338