如何在powershell中将单引号和coma放在字符串中
我试着在行尾加上逗号的单引号,但我想不出如何才能做到这一点。到目前为止,我只能把逗号单引号放在末尾,但我想把单引号放在行的开头。有人能帮忙吗 我想实现“test1”, 但目前我只能做测试1’如何在powershell中将单引号和coma放在字符串中,powershell,Powershell,我试着在行尾加上逗号的单引号,但我想不出如何才能做到这一点。到目前为止,我只能把逗号单引号放在末尾,但我想把单引号放在行的开头。有人能帮忙吗 我想实现“test1”, 但目前我只能做测试1’ #Define Variables $a = 'P:\Powershell practice\Movefolder\LD.txt' $b = get-content $a #Define Functions function append-text { process{ foreach-object
#Define Variables
$a = 'P:\Powershell practice\Movefolder\LD.txt'
$b = get-content $a
#Define Functions
function append-text {
process{
foreach-object {$_ + "',"}
}
}
#Process Code
$b | append-text
这个
function append-text {
process{
foreach-object {"'" + $_ + "',"}
}
}