PS C:\> $a = 'get-date'; $b = 'a'; $c = 'b'; $d = 'c' PS C:\> "`$a = {0}`n`$b = {1}`n`$c = {2}`n$d = {3}" -f $a,$b,$c,$d $a = get-date $b = a $c = b $d = c PS C:\> |
PS C:\> function ier ($cmd) { >> while (dir -Path variable: -Name | ?{$_ -eq $cmd}) >> { >> $cmd = Invoke-Expression `$$cmd >> } >> $cmd >> } >> PS C:\> |
PS C:\> ier $d get-date PS C:\> & $(ier $d) 2007年7月6日 1:30:03 PS C:\> |
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |