LoginSignup
7
6

More than 5 years have passed since last update.

コマンドプロンプト(cmd.exe)上でuniqするワンライナー

Posted at
  • uniq
for /f "usebackq tokens=*" %a in (`type ファイル名`) do @(if not !BK!==%a echo %a)&&set BK=%a
  • uniq -d
for /f "usebackq tokens=*" %a in (`type ファイル名`) do @(if !BK!==%a echo %a)&&set BK=%a
7
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6