From owner-freebsd-questions@FreeBSD.ORG Fri Jul 2 14:01:23 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F379106564A for ; Fri, 2 Jul 2010 14:01:23 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by mx1.freebsd.org (Postfix) with ESMTP id 426C88FC27 for ; Fri, 2 Jul 2010 14:01:22 +0000 (UTC) Received: by red.stonehenge.com (Postfix, from userid 1001) id AFBC52DEA0; Fri, 2 Jul 2010 07:01:22 -0700 (PDT) From: merlyn@stonehenge.com (Randal L. Schwartz) To: Aiza References: <4C2D2839.3040909@comclark.com> <20100702000124.GG19474@libertas.local.camdensoftware.com> <4C2D5F58.3050708@comclark.com> x-mayan-date: Long count = 12.19.17.8.17; tzolkin = 11 Caban; haab = 10 Tzec Date: Fri, 02 Jul 2010 07:01:22 -0700 In-Reply-To: <4C2D5F58.3050708@comclark.com> (Aiza's message of "Fri, 02 Jul 2010 11:39:04 +0800") Message-ID: <86pqz6ugnh.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chip Camden , "questions@freebsd.org" Subject: Re: Bourne .sh ? 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, 02 Jul 2010 14:01:23 -0000 >>>>> "Aiza" == Aiza writes: Aiza> Wow do I feel stupid. You saw through my question to the underlying problem Aiza> causing the need to strip off that stuff. I just changed the command from ls Aiza> -l to ls -1 and got what I wanted in the first place. I'm surprised how often -1 is used when not needed. ls is smart, and automatically defaults to -1 if the output isn't a terminal. Consider the difference between: $ ls and $ ls | cat Back in the day, before the boys at Berkeley added multicolumn output, there was a concern that changing the format of `ls` would break a lot of scripts, so they were careful to do it in a backward-compatible mechanism. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion