shuzo-kino.hateblo.jp
では、nlコマンドで行数を出す方法を紹介しました。
更に、catで行数を出す方法なんてのも。
shuzo-kino.hateblo.jp
で、若干特殊な方法としてnlコマンドで「行を出さない」。
見方を変えればインデントをつけてるような感じですね。
実際のところ
"-bn"オプションです。
$ nl -bn tmp.txt
France 12 "UTC−10:00 — most of French Polynesia
UTC−09:30 — Marquesas Islands
UTC−09:00 — Gambier Islands
UTC−08:00 — Clipperton Island
UTC−04:00 (AST) — Guadeloupe, Martinique, Saint Barthelemy, Saint Martin
UTC−03:00 (PMST) — French Guiana, Saint Pierre and Miquelon
UTC+01:00 (CET) — Metropolitan France
UTC+03:00 — Mayotte
UTC+04:00 — Réunion
UTC+05:00 — Kerguelen Islands
UTC+11:00 — New Caledonia
UTC+12:00 — Wallis and Futuna"
参考もと
- man nl