<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>BigFatCat</author_name>
  <author_url>https://blog.hatena.ne.jp/BigFatCat/</author_url>
  <blog_title>BigFatCatのブログ</blog_title>
  <blog_url>https://bigfatcat.hateblo.jp/</blog_url>
  <categories>
    <anon>shellscript</anon>
  </categories>
  <description>特に、ログインシェルを抜き出して何かしたいわけじゃないけど、シェルスクリプトのメモとして残しておく。 実際にやってるのは、「ファイル中の各行を指定したセパレータでトークンに分解してやって、n番目のトークンを取り出す」という処理。 Perl や Ruby で書いてもよいけど、もっと簡単なのが cut コマンドを使った方法。以下のようにすると、cut コマンドがコロン「:」で各行をトークンに切って、そのトークンの内の7番目を表示してくれる。 $ cut -d':' -f7 /etc/passwd /bin/bash /bin/bash /bin/bash /bin/bash こうして取り出したログ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbigfatcat.hateblo.jp%2Fentry%2F20070905%2F1188981142&quot; title=&quot; ログインシェルを抜き出す　シェルスクリプトメモ（2） - BigFatCatのブログ&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>2007-09-05 17:32:22</published>
  <title> ログインシェルを抜き出す　シェルスクリプトメモ（2）</title>
  <type>rich</type>
  <url>https://bigfatcat.hateblo.jp/entry/20070905/1188981142</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
