From owner-freebsd-questions@FreeBSD.ORG Tue Jun 27 12:01:58 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 8FFA816A401 for ; Tue, 27 Jun 2006 12:01:58 +0000 (UTC) (envelope-from dwinner-lists@att.net) Received: from mtiwmhc12.worldnet.att.net (mtiwmhc12.worldnet.att.net [204.127.131.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D37143D45 for ; Tue, 27 Jun 2006 12:01:57 +0000 (GMT) (envelope-from dwinner-lists@att.net) Received: from [10.10.6.20] (unknown[216.113.237.29]) by worldnet.att.net (mtiwmhc12) with ESMTP id <2006062712015711200652q9e>; Tue, 27 Jun 2006 12:01:57 +0000 Message-ID: <44A11E2D.3010006@att.net> Date: Tue, 27 Jun 2006 08:01:49 -0400 From: dw User-Agent: Thunderbird 1.5.0.4 (X11/20060621) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: need help w/ simple bash script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dwinner-lists@att.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2006 12:01:58 -0000 Hi all, I am trying to write a simple bash script that will collate pkg_version reports from all of my servers to generate centralized HTML reports. To format the output, I am trying: # REPORT=`pkg_version -v` But when I "echo $REPORT", I get: Xaw3d-1.5E_1 = up-to-date with port apr-db42-1.2.7_1 = up-to-date with port autoconf-2.13.000227_5 = up-to-date with port autoconf-2.59_2 = up-to-date with port automake-1.9.6 = up-to-date with port bash-3.1.17 = up-to-date with port cvsup-without-gui-16.1h_2 = up-to-date with port db41-4.1.25_3 = up-to-date with port............................. When what I want is: Xaw3d-1.5E_1 = up-to-date with port apr-db42-1.2.7_1 = up-to-date with port autoconf-2.13.000227_5 = up-to-date with port autoconf-2.59_2 = up-to-date with port automake-1.9.6 = up-to-date with port bash-3.1.17 = up-to-date with port cvsup-without-gui-16.1h_2 = up-to-date with port db41-4.1.25_3 = up-to-date with port ... ... ... I've also tried: for LINE in `pkg_version -v`; do echo $LINE; done but that's even worse; then I get: Xaw3d-1.5E_1 = up-to-date with port apr-db42-1.2.7_1 = up-to-date with port autoconf-2.13.000227_5 = up-to-date with port autoconf-2.59_2 = up-to-date with port ... ... ... I know I figured out a technique once before, but I'm banging my head against a wall right now. Thanks for any help. -DW