LoginSignup
0
0

More than 3 years have passed since last update.

historyコマンドで行番号を表示させない

Last updated at Posted at 2020-02-14

実行コマンド

$ history | awk '{$1=""; print}'

解説

$ history
...
  531  ls -l
  532  ls -l | awk '{$0;print}'

historyコマンドで上記の結果が出力される.
awkコマンドでスペース区切りした時の1つ目のフィールドにブランクを代入して出力する.

参考

historyコマンドで行数表示しない
awk で指定したフィールドを削除する | まくまくsed/awkノート

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0