You are not logged in.

#1 2011-04-03 12:11:18

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

[SOLVED] terminal history - merge repeatings..

.. how to?

Last edited by student975 (2011-04-03 12:33:59)


"I exist" is the best myth I know..

Offline

#2 2011-04-03 12:20:49

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: [SOLVED] terminal history - merge repeatings..

Use sort and uniq.

Offline

#3 2011-04-03 12:28:12

ushimitsudoki
Member
From: Okinawa
Registered: 2010-07-20
Posts: 18
Website

Re: [SOLVED] terminal history - merge repeatings..

If you mean your shell command history, in bash , you can look at HISTCONTROL and the ignoredups, erasedups, ignoreboth, and ignorespace options.

Similar options exist for other shells.  For example, zsh has hist_ignore_all_dups and similar options to the bash options.


Free Software, Free Society

Offline

#4 2011-04-03 12:28:17

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: [SOLVED] terminal history - merge repeatings..

Awebb wrote:

Use sort and uniq.

Can you, please, be more elaborate? I mean, say, after such session

$ who
$ ls
$ ls

first arrow up shows 'ls', and second one shows 'who'.


"I exist" is the best myth I know..

Offline

#5 2011-04-03 12:33:30

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: [SOLVED] terminal history - merge repeatings..

ushimitsudoki wrote:

If you mean your shell command history, in bash , you can look at HISTCONTROL and the ignoredups, erasedups, ignoreboth, and ignorespace options.

Similar options exist for other shells.  For example, zsh has hist_ignore_all_dups and similar options to the bash options.

Got it, thanks!


"I exist" is the best myth I know..

Offline

Board footer

Powered by FluxBB