- 追加された行はこの色です。
- 削除された行はこの色です。
* cut [#x721cc28]
** 前提 [#m2a16932]
> echo-program.exe(またはecho-program.sh)
ABC DEF XYZ
123 456 789
FOO BAR BAZ
上のような実行すると文字列を出力するプログラムがあるとする。
** ConvertFrom-Csvコマンドレット [#l05d4027]
echo-program.sh | cut -d " " -d 1,3 # Bash
echo-program.exe | ConvertFrom-Csv -Delimiter " " -Header (1..3) | select "1", "3" | ft -a # PowerShell
echo-program.sh | cut -d " " -d 1,3 # Bash
echo-program.exe | ConvertFrom-Csv -Delimiter " " -Header (1..3) | select "1", "3" # PowerShell
PowerShellで出力結果を整形するにはft -a等を使う。