From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25248 invoked by alias); 13 Oct 2014 21:32:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19247 Received: (qmail 3655 invoked from network); 13 Oct 2014 21:32:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <141013143308.ZM6789@torch.brasslantern.com> Date: Mon, 13 Oct 2014 14:33:08 -0700 In-reply-to: <543C3707.4040906@eastlink.ca> Comments: In reply to Ray Andrews "Re: combine/merge .history?" (Oct 13, 1:33pm) References: <20141002204012.0b884f9c@pws-pc.ntlworld.com> <542FFF6D.6080105@eastlink.ca> <141004084635.ZM6823@torch.brasslantern.com> <543C05F3.2020804@eastlink.ca> <141013105932.ZM6622@torch.brasslantern.com> <543C3707.4040906@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Ray Andrews , zsh-users@zsh.org Subject: Re: combine/merge .history? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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.