zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>, zsh-users@zsh.org
Subject: Re: combine/merge .history?
Date: Mon, 13 Oct 2014 14:33:08 -0700	[thread overview]
Message-ID: <141013143308.ZM6789@torch.brasslantern.com> (raw)
In-Reply-To: <543C3707.4040906@eastlink.ca>

On Oct 13,  1:33pm, Ray Andrews wrote:
} Subject: Re: combine/merge .history?
}
} On 10/13/2014 10:59 AM, Bart Schaefer wrote:
} 
} Bart:
} 
} > }   1074* c Boot
} > }   1075* e zshrc
} > }   1076* A
} > }   1077* man pv
} >
} > ... doesn't look like anything zsh ever saved
} 
} pts/2 HP-y5--5-Debian1 root / $ history
}   1086* W
}   1087* l ,m
}   1088* hdparm -C /dev/sda
}   1089* cat .histfile
} 
} ... so that seems to be plain vanilla history output, no? 

Sorry, I thought you were giving examples of file contents, not examples
of the output of the "history" command.  I didn't recognize it because I
never use SHARE_HISTORY and forgot that "foreign" history entries get
marked with a "*".

So ... if the format of entries *in the two files* looks similar, you
should be OK to combine them.  If both of them have the extended format
(timestamp:elapsed;command) then you should be able to merge them and
sort the result by timestamp without any major problems.

Just beware of multi-line entries, e.g., a plain "sort -n" will garble
those badly.


  reply	other threads:[~2014-10-13 21:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 19:40 Trial for 5.0.7 Peter Stephenson
2014-10-04 14:08 ` Ray Andrews
2014-10-04 15:46   ` Bart Schaefer
2014-10-04 21:29     ` Ray Andrews
2014-10-08 20:06     ` Ray Andrews
2014-10-08 22:24       ` Bart Schaefer
2014-10-13 17:03     ` combine/merge .history? Ray Andrews
2014-10-13 17:59       ` Bart Schaefer
2014-10-13 20:33         ` Ray Andrews
2014-10-13 21:33           ` Bart Schaefer [this message]
2014-10-13 21:58             ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=141013143308.ZM6789@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).