0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[sed]【1行野郎】特定の文字から特定の文字が現れるまでの区間を抽出し、最終行を削除する

Last updated at Posted at 2021-08-25
本シリーズのトップページ
https://qiita.com/robozushi10/items/5d1313fa11ede179ddad

概要

後述の図のように、
「Containers:」の開始から「Conditions:」が現われるまでを抽出し、その後に最終行を削除する

$ kubectl describe pods init-sample | \
    sed -n  '/^Containers:/,/Conditions:/p' | \
    sed '$d'

image.png

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?