逆引きUNIXコマンド/テキストファイルに行番号を付けたい
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#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)
終了行:
#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)
ページ名: