逆引きUNIXコマンド/テキストファイルに行番号を付けたい
の編集
Top
/
逆引きUNIXコマンド
/
テキストファイルに行番号を付けたい
[
トップ
] [
編集
|
差分
|
バックアップ
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
(no template pages)
#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)
テキスト整形のルールを表示する
添付ファイル:
cat-n-01.png
521件
[
詳細
]