2014-04-29から1日間の記事一覧

プロファイルでエイリアスの記述された行を表示

PowerShellガンガン学習中。 $lines = gc $profile | ? { $_ -match "^sal|^Set-Alias" } echo $linesこれがSelect-Stringなら・・・ sls "^sal|^Set-Alias" $profileこう書ける。メリットは ・既製のもので短く書ける ・行数表示してくれる ・Contextパラメ…