From owner-freebsd-questions@FreeBSD.ORG Fri Dec 12 05:26:42 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B085C22 for ; Fri, 12 Dec 2014 05:26:42 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE81CF03 for ; Fri, 12 Dec 2014 05:26:41 +0000 (UTC) Received: from r56.edvax.de (port-92-195-5-37.dynamic.qsc.de [92.195.5.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 1F58B3CD90; Fri, 12 Dec 2014 06:26:31 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id sBC5QVg2002204; Fri, 12 Dec 2014 06:26:31 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Fri, 12 Dec 2014 06:26:31 +0100 From: Polytropon To: Jon Radel Subject: Re: Maybe somebody knows a good Bourne Shell book or tutorial? Message-Id: <20141212062631.a3d891fe.freebsd@edvax.de> In-Reply-To: <548A1095.6010301@radel.com> References: <54892F4C.1030906@rawbw.com> <20141211200241.GA43214@scout.stangl.us> <548A1095.6010301@radel.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2014 05:26:42 -0000 On Thu, 11 Dec 2014 16:45:57 -0500, Jon Radel wrote: > On 12/11/14, 3:02 PM, Alex Stangl wrote: > > On Wed, Dec 10, 2014 at 09:44:44PM -0800, Yuri wrote: > >> There are some quite tricky areas and questions about sh and hard to > >> find information. > >> > >> Anybody knows of some good book that would cover all essential issues of > >> Bourne shell programming? > > Classic Shell Scripting (from O'Reilly) is good. > > > > > I would second this. It's my current go-to reference when writing a > script where > I actually care about POSIX and the script being used for more than a day. In this case, especially when you care about portability and interoperability, I'd like to suggest reading the following two articles about how to deal with filenames: David A. Wheeler: Fixing Unix/Linux/POSIX Filenames: Control Characters (such as Newline), Leading Dashes, and Other Problems http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html David A. Wheeler: Filenames and Pathnames in Shell: How to do it correctly http://www.dwheeler.com/essays/filenames-in-shell.html Additionally, it's worth knowing the _difference_ between the Bourne Shell and the BASH extensions, because those two shells aren't the same, even though there are people who seem to think this. When the "dash" shell enters the stage, the fun is about to start. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...