Date: Fri, 01 Nov 2013 10:26:58 -0500 From: CyberLeo Kitsana <cyberleo@cyberleo.net> To: Martin McCormick <martin@dc.cis.okstate.edu> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Inputs and outputs in the right order Message-ID: <5273C842.9010305@cyberleo.net> In-Reply-To: <201311010256.rA12u1jx009134@x.it.okstate.edu> References: <201311010256.rA12u1jx009134@x.it.okstate.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/31/2013 09:56 PM, Martin McCormick wrote: <snip> > I know that expect does a great job of logging a session > but I am wondering if there is an easier way to get the shell > input echoed interwoven with all the output. In shorter words, > what is the easiest way to produce a session log that reads like > what actually happened when it happened? In bourne-compatible shells (/bin/sh, bash) run 'set -x' or pass the -x flag during invocation to turn on debug output. The shell will print out each command it is about to invoke. The output requires some interpretation, as it can get confusing in the presence of variable expansion, pipelines, and subshells; but it should be adequate for a simple list of commands. -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net <CyberLeo@CyberLeo.Net> Furry Peace! - http://www.fur.com/peace/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5273C842.9010305>