<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>a1026302</author_name>
  <author_url>https://blog.hatena.ne.jp/a1026302/</author_url>
  <blog_title>ものづくりのブログ</blog_title>
  <blog_url>https://a1026302.hatenablog.com/</blog_url>
  <categories>
    <anon>コマンド</anon>
    <anon>コマンド-sort</anon>
  </categories>
  <description>sort コマンドで tsv ファイルを並べ替えしたときのメモをここに残します。 やりたいこと tsv ファイルを、5列目の値を数値として昇順に並べ替える。 コマンド sort -t $'\t' -k5,5n [ファイル名] 各オプションの意味 -t $'\t' 区切り文字をタブに指定する $'\t' は bash / zsh でタブ文字を表す書き方 指定しないと「空白（スペースとタブ）の連続」が区切りになるため、列の中にスペースが入っていると列の数え方がずれる -k5,5n 5列目だけをソートキーにして、数値として比較する指定 -k5,5 は「5列目から5列目まで」の意味。-k5 とだけ書く…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa1026302.hatenablog.com%2Fentry%2F2026%2F01%2F28%2F112656&quot; title=&quot;sort コマンドで tsv ファイルを並べ替え - ものづくりのブログ&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>https://cdn.user.blog.st-hatena.com/default_entry_og_image/157314735/1599576939808917</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-01-28 11:26:56</published>
  <title>sort コマンドで tsv ファイルを並べ替え</title>
  <type>rich</type>
  <url>https://a1026302.hatenablog.com/entry/2026/01/28/112656</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
