Skip to content

Instantly share code, notes, and snippets.

@donchan922
Last active November 30, 2019 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donchan922/c0b09a5ef1fc96fee964dc9d8a4456ea to your computer and use it in GitHub Desktop.
Save donchan922/c0b09a5ef1fc96fee964dc9d8a4456ea to your computer and use it in GitHub Desktop.
# 読み込むファイル
$ cat demo.txt
CentOS
Red Hat Enterprise Linux
Fedora
Ubuntu
Debian
# demo.txtから「Ubuntu」を含む行を削除した結果を、result.txtに出力する
$ sed '/Ubuntu/d' demo.txt > result.txt
$ cat result.txt
CentOS
Red Hat Enterprise Linux
Fedora
Debian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment