<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takuya_1st</author_name>
  <author_url>https://blog.hatena.ne.jp/takuya_1st/</author_url>
  <blog_title>それマグで！</blog_title>
  <blog_url>https://takuya-1st.hatenablog.jp/</blog_url>
  <categories>
    <anon>linux</anon>
    <anon>gnu</anon>
    <anon>sed</anon>
    <anon>bash</anon>
  </categories>
  <description>指定行を表示 / head 相当をする 以前、sed で行挿入をシンプルに行う。 とういう記事を書いたとき、範囲指定について言及した。 今回は、sedの範囲指定を使って 先頭からN行を取得してみる。 範囲指定の練習 行番号を指定して、その行を表示する。 指定行を表示 / head 相当 これは、範囲'1,22' について p (print)を指定しています。 sed -n '1,22p' これは、次のコマンドと同じ。 head -n 22 範囲指定について 指定範囲ｘ操作 でコマンドが構成されています。操作に sを指定すると置換(substituttion)が行われる。 sed は、ed/ex…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F2023%2F01%2F18%2F171601&quot; title=&quot;sedで指定行表示 / head コマンド相当 - それマグで！&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-01-18 17:16:01</published>
  <title>sedで指定行表示 / head コマンド相当</title>
  <type>rich</type>
  <url>https://takuya-1st.hatenablog.jp/entry/2023/01/18/171601</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
