1. 首页
  2. 数据库
  3. 其它
  4. Windows Powershell 访问数组

Windows Powershell 访问数组

上传者: 2021-02-01 07:45:18上传 PDF文件 34.24KB 热度 24次
数组的元素可以使用索引寻址,第一个元素的索引为0,第i个元素的索引为i-1,最后一个元素的索引为Count-1,但是Powershell为了使用方便,直接可以将 -1 作为最后的一个元素的索引。 PS C:Powershell> $books=元素1,元素2,元素3 PS C:Powershell> $books[0] 元素1 PS C:Powershell> $books[1] 元素2 PS C:Powershell> $books[($book.Count-1)] 元素3 PS C:Powershell> $books[-1] 元素3 从数组中选择多个元素 PS C:Po
下载地址
用户评论