From owner-freebsd-questions@FreeBSD.ORG Fri Jul 12 01:34:14 2013 Return-Path: Delivered-To: questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 68A1A4ED; Fri, 12 Jul 2013 01:34:14 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 38D2A1124; Fri, 12 Jul 2013 01:34:13 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.16]) by ltcfislmsgpa07.fnfis.com (8.14.5/8.14.5) with ESMTP id r6C1XB1J002217 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 11 Jul 2013 20:33:11 -0500 Received: from LTCFISWMSGMB21.FNFIS.com ([10.132.99.23]) by LTCFISWMSGHT05.FNFIS.com ([10.132.206.16]) with mapi id 14.02.0309.002; Thu, 11 Jul 2013 20:33:11 -0500 From: "Teske, Devin" To: Fbsd8 Subject: Re: jls usage Thread-Topic: jls usage Thread-Index: AQHOfp3t7CzmG2bQFUGOk1hY5Ll26Zlglh4A Date: Fri, 12 Jul 2013 01:33:10 +0000 Message-ID: <13CA24D6AB415D428143D44749F57D7201FBF9CF@ltcfiswmsgmb21> References: <51DF59B1.4020107@a1poweruser.com> In-Reply-To: <51DF59B1.4020107@a1poweruser.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.132.253.126] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794, 1.0.431, 0.0.0000 definitions=2013-07-12_01:2013-07-12,2013-07-12,1970-01-01 signatures=0 Cc: Devin Teske , questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Devin Teske List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2013 01:34:14 -0000 On Jul 11, 2013, at 6:19 PM, Fbsd8 wrote: > In a .sh script I'm trying to get the jid for a single jail using this co= de >=20 > jid=3D`jls -j jailname | cut -f 1- | awk '{print $1}'` >=20 Looks a little over complicated... why not just.. jls -j jailname jid --=20 Devin > The first line output by jls is a title line which the cut command is sup= pose to cut out so the first field on line 2 gets selected by the awk comma= nd. This is not working as I want, I get the first field of the title line. >=20 > Is the cut command the correct command to us here? >=20 > This is what the jls command shows > # /root >jls -j dir2 > JID IP Address Hostname Path > 15 10.0.10.24 dir2 /usr/jails/dir2 >=20 > I am after the number 15 >=20 > Thanks in advance >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.