From owner-freebsd-questions@FreeBSD.ORG Fri Jul 27 07:28:20 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A01416A417 for ; Fri, 27 Jul 2007 07:28:20 +0000 (UTC) (envelope-from nino80@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id 0830013C459 for ; Fri, 27 Jul 2007 07:28:19 +0000 (UTC) (envelope-from nino80@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so609408waf for ; Fri, 27 Jul 2007 00:28:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ToIxoBHM21xJ4hlM/mE6ulM5E9/dxMAdFFtiSM/yAtZ27T/eIVLgBETZCJKLyA/aCq+7ujF+TuCz2aUGSFoZKGI7lKWWVMZo6vhO5YTrF22RYPkUFg8kFfyK/umGEobavCInDK1A3W7+3Ro91QvQw51qp/0tcXOoRnVuou+cvkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XCniBer2cwJ8eUo63ylVzj3iDQv11L1BI+UnPQUuTYoD2rQXEfpLs7fJGWpbfLNmcZrMV7XBwbTqvvpelQhjPuize9SlLJYusd8tL/gDc/MvSYbFWSE7ZnwqRfKFvZlm/epXKIzRw6JE00eFrqlryk5ZYmnJxcnw4aUBvmSBwpc= Received: by 10.115.58.1 with SMTP id l1mr2628219wak.1185521299686; Fri, 27 Jul 2007 00:28:19 -0700 (PDT) Received: by 10.114.208.4 with HTTP; Fri, 27 Jul 2007 00:28:19 -0700 (PDT) Message-ID: <92bcbda50707270028r79a8a706r37ca096bdb793001@mail.gmail.com> Date: Fri, 27 Jul 2007 09:28:19 +0200 From: "n j" To: freebsd-questions@freebsd.org In-Reply-To: <200707262151.l6QLpm9f068503@dc.cis.okstate.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707262151.l6QLpm9f068503@dc.cis.okstate.edu> Subject: Re: awk question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2007 07:28:20 -0000 > > > awk '{print $(NF-1)}' user.csv > > Yup, those blank lines will kill it for sure. A sed filter to > remove blank lines ahead of the awk statement should allow it to > work properly. Or awk only i.e. no sed: awk '!(/^$/) { print $(NF-1) }' user.csv -- Nino