From owner-freebsd-questions@FreeBSD.ORG Fri Nov 1 15:27:05 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EB9512C7 for ; Fri, 1 Nov 2013 15:27:05 +0000 (UTC) (envelope-from cyberleo@cyberleo.net) Received: from mail.cyberleo.net (mtumishi.cyberleo.net [216.226.128.201]) by mx1.freebsd.org (Postfix) with ESMTP id C902E2449 for ; Fri, 1 Nov 2013 15:27:05 +0000 (UTC) Received: from [172.16.44.4] (vitani.den.cyberleo.net [216.80.73.130]) by mail.cyberleo.net (Postfix) with ESMTPSA id 91BBC7C5E; Fri, 1 Nov 2013 11:26:59 -0400 (EDT) Message-ID: <5273C842.9010305@cyberleo.net> Date: Fri, 01 Nov 2013 10:26:58 -0500 From: CyberLeo Kitsana User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130908 Thunderbird/17.0.8 MIME-Version: 1.0 To: Martin McCormick Subject: Re: Inputs and outputs in the right order References: <201311010256.rA12u1jx009134@x.it.okstate.edu> In-Reply-To: <201311010256.rA12u1jx009134@x.it.okstate.edu> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Nov 2013 15:27:06 -0000 On 10/31/2013 09:56 PM, Martin McCormick wrote: > 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 Furry Peace! - http://www.fur.com/peace/