LoginSignup
5
3

More than 5 years have passed since last update.

空行削除コマンド

Last updated at Posted at 2018-01-19

データを処理してるときとかに,空行削除したくてコマンド探したけどありそうでなさそうなだった.

sed '/^$/d'
ruby -pe '$_.gsub!(/^\s*$/,"")'
5
3
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
5
3