powershell提供了get-content
命令,这个命令还存在3个别名,分别是gc
, cat
, type
,这4个是等同的。
function head(){
param(
[String]$f,
[int]$n=6
)
$cont = cat -TotalCount $n $f
return $cont
}
head "data.txt"
powershell提供了get-content
命令,这个命令还存在3个别名,分别是gc
, cat
, type
,这4个是等同的。
function head(){
param(
[String]$f,
[int]$n=6
)
$cont = cat -TotalCount $n $f
return $cont
}
head "data.txt"
转载于:https://www.cnblogs.com/raybiolee/p/6262012.html