- #@&cls&powershell "type '%~0'|out-string|iex"&pause&exit
-
- $1='BirdNamePYSX.txt'
- $2='DuoYinZi.txt'
-
- $f=@'
- $b=$_ -split ','
- $c=$b[1]-split ' '
- 0..($b[0].length-1)|%{$h[$b[0][$_]]=$c[$_]}
- '@
-
- $a=gc $1
- $h=@{}
- $a|%{
- iex $f
- $arr+=,$b[0]
- }
-
- gc $2|%{iex $f}
-
- $arr|%{
- $a=$_
- $b=$c=''
- $d=@()
- 0..($a.length-1)|%{
- $b+=$a[$_]
- $c+=([string]$h[$a[$_]][0]).toupper()
- $e=$h[$a[$_]]
- $d+=,($e.substring(0,1).toupper()+$e.substring(1))
- }
- '{0},{2},{1}' -f $b,$c,($d -join ' ').trim()
- }
复制代码
|