作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何输入一个列表,并将内容显示在多列中,例如在三项之后;例子:
$carlist = "c:\temp\list-of-cars.txt" # listing 10 cars
$num-cols = 4
Car1
Car2
..
Car9
Car10
$c = $carlist.count/$num-cols # some number of columns
write-host $carlist (something)
Car1 Car4 Car7 Car10
Car2 Car5 Car8
Car3 Car6 Car9
最佳答案
$cars = get-content "list-of-cars.txt"
$cars | Format-Wide {$_} -Column 4 -Force
Get-Content .\list-of-cars.txt | Format-Wide {$_} -Column 4 -Force
关于powershell - 将输入列表分成几列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13367418/
我正在尝试使用描述的方法将数据表转换为字典 here , 但我得到一个错误 Cannot implicitly convert type System.Collections.Generic.Dict
我想在几个列上使用 orderBY,但它们应该像一列一样。 该表看起来像这样: col1 | col2 5 | 2 | | 3 7 | | 1 | 1
我有这张表 mytable: +----+--------------------------------------+ | id | date1 | date2 | date3
我是一名优秀的程序员,十分优秀!