#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)

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS