<?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>mcmd</anon>
  </categories>
  <description>sortコマンドで先頭文字を数字として解釈しソートするには cat test |sort -g | moreUNIXの通常のソートなら、残念な結果になる。 次のファイル test 1 3 4 7 8 9 10 2 5 6 sort でソートすると残念な結果に cat test | sort 1 10 2 3 4 5 6 7 8 9辞書式に並んでしまう。ムッキー 数字で評価する -g オプション それでもオプションをつければ大丈夫！ cat test2 | sort -g 1 2 3 4 5 6 7 8 9 10ちゃんと、数字順に並んだね。 小さい処理を組み合わせて使うのがUNIX UNIXとい…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F20121003%2F1349262795&quot; title=&quot; 数字としてソートする sort -g - それマグで！&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>2012-10-03 20:13:15</published>
  <title> 数字としてソートする sort -g</title>
  <type>rich</type>
  <url>https://takuya-1st.hatenablog.jp/entry/20121003/1349262795</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
