#navi(../)
* テキストファイルに行番号を付けたい [#wbd42dd9]
catコマンドに-nオプションを付けると実現できます。
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
** コマンド [#sa29799f]
下記の例はdata.txtに行番号を付けます。~
catコマンドの-nオプションにより実現しています。
cat -n data.txt
** 実行結果 [#u0d501f9]
上記コマンドの実行結果です。
#ref(cat-n-01.png)