<?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' は「タブ文字」 -k5,5n 5列目だけをキーにして数値ソートする指定 -k5,5: 「5列目から5列目までをソートキーにする」 n: 数値として比較する（numeric sort） n がないと文字列比較になる 具体例 入力（TSV） a b c d 10 a b c d 2 a b c d 30 実行 …</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>
