From owner-freebsd-questions@FreeBSD.ORG Thu Nov 25 17:26:50 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 777CC16A4CE for ; Thu, 25 Nov 2004 17:26:50 +0000 (GMT) Received: from nwlynx.network-lynx.net (nwlynx.network-lynx.net [63.122.185.99]) by mx1.FreeBSD.org (Postfix) with ESMTP id 443B843D54 for ; Thu, 25 Nov 2004 17:26:50 +0000 (GMT) (envelope-from Don@Silver-Lynx.com) Received: from [70.57.246.81] (helo=Silver-Lynx.com) by nwlynx.network-lynx.net with esmtpa (Exim 4.42 #1) id 1CXNOf-000Nyp-VR by authid with fixed_cram for ; Thu, 25 Nov 2004 10:27:10 -0700 Message-ID: <41A615CE.6010405@Silver-Lynx.com> Date: Thu, 25 Nov 2004 10:26:38 -0700 From: Don Wilde User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031028 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: shell programming challenge X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 17:26:50 -0000 Hey, folks - I need to find a way to kick off an xterm running BASH and then execute a program within that xterm, but NOT close the new xterm after the program finishes. Another desirable thing would be to also be able to 'source in' a file of shell environment that would affect the new window and shell. Here's what I've found out so far: Assume we have an executable test file 'ticktock': #!/bin/sh for n in 1 2 3 4 5 6 7 8 do echo "$n MYVAR=$MYVAR" sleep 1 echo -n "continue? " read reply done # end of ticktock I want to do something like: xterm -e bash <(echo ./ticktock) & When I do this, the program works & interacts, but the xterm dies upon completion of ticktock or INT. I also do not seem to be able to use the --rcfile switch as a bash option, although I can add KEY=VALUE pairs before the xterm launch. Ideas? Please respond to me directly. -- Don Wilde ---------> Silver Lynx <---------- Raising the Trajectory of Human Development --------------------------------------------- http://www.Silver-Lynx.com