LoginSignup
3
1

More than 5 years have passed since last update.

wc -l は改行で終端しない行を数に入れない

Posted at

知らなかった

$ echo -e 'a\nb' | wc -l
2
$ printf 'a\nb' | wc -l
1
$ echo -ne 'a\nb' | wc -l
1
3
1
2

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
3
1