From owner-freebsd-questions@freebsd.org Wed Oct 18 13:13:47 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 631BBE38A27 for ; Wed, 18 Oct 2017 13:13:47 +0000 (UTC) (envelope-from 4250.10.freebsd-questions=freebsd.org@email-od.com) Received: from bca5.email-od.com (bca5.email-od.com [207.246.239.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 303B57CFF5 for ; Wed, 18 Oct 2017 13:13:46 +0000 (UTC) (envelope-from 4250.10.freebsd-questions=freebsd.org@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1508332425; x=1510924425; h=x-thread-info:date:from:to:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; bh=Ueg+2oODTz0af7u2p5+MLjXIQ1KvvnFOx1ZWLcUjs/w=; b=PXvn3qIcuaf+QlK1WsIIAEpAz6vzuR6/18v/DlrbP3jgVYUvgGUVmwIlYkHYW6OvB2Gdb/Ly1GhoXjUk1RaCjX0OIUdoBnmk9RofS5VUL2/CQYLmUjXsdhFrv/pGgF6WdcpP+eRC/3fPpRlwx49r9uJiVj0mXvWMldBsMBQ4UBU= X-Thread-Info: NDI1MC4xMi5lNTAwMDAwMDMwMTFmZS5mcmVlYnNkLXF1ZXN0aW9ucz1mcmVlYnNkLm9yZw== Received: from r2.us-east.aws.in.socketlabs.com (r2.us-east.aws.in.socketlabs.com [54.85.171.149]) by bca2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Wed, 18 Oct 2017 09:13:35 -0400 Received: from smtp.lan.sohara.org (EMTPY [89.127.62.20]) by r2.us-east.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Wed, 18 Oct 2017 09:13:35 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1e4oA9-0003LI-Ho for freebsd-questions@freebsd.org; Wed, 18 Oct 2017 13:13:33 +0000 Date: Wed, 18 Oct 2017 14:13:33 +0100 From: Steve O'Hara-Smith To: freebsd-questions@freebsd.org Subject: Re: Scripting problem Message-Id: <20171018141333.498b9ab3cf924144da5fe8b5@sohara.org> In-Reply-To: <5D3BAA54-3229-4472-8A4D-A10D3F3F07D9@fjl.co.uk> References: <7AB396F429EEB6890100F082@Pauls-MacBook-Pro.local> <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> <20171008100017.30ab5987.freebsd@edvax.de> <88D321A2CCD516AEF39DE8C3@Pauls-MacBook-Pro.local> <1984508980.4145408.1507553196491@mail.yahoo.com> <5D3BAA54-3229-4472-8A4D-A10D3F3F07D9@fjl.co.uk> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd11.0) X-Clacks-Overhead: "GNU Terry Pratchett" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2017 13:13:47 -0000 On Tue, 17 Oct 2017 19:30:20 +0100 "Frank Leonhardt (m)" wrote: > Interesting debate this. Personally I have always regarded sh as a Job > Control Language. Probably showing my age. Yes, but one designed to be an interactive environment aka a user interface. > As such it's intended for controlling jobs written in 'C' (being Unix). Or indeed any other compiled or interpreted language (arguably the latter are jobs written in a compiled language and the interpreted language is the data). > All it had to do is put the data in the right place for input, and > arrange for the output to end up where it should. In no way should it be > used for implementing an algorithm. Well perhaps, but multi-user system command line interfaces tend to be simple programming languages because that's what you need to automate even quite simple manual tasks. I'm not entirely sure that adding function and local variable support wasn't a step too far, but rather that than BASIC IMHO. > You do need to invest the time to learn a compiled language like 'C'. I know a great many productive programmers who never did. I'd take an understanding of basic computer science - data structures, algorithms, cost calculations and an appreciation of good abstractions and elegance over any particular language or language family. > Friendly interpreted languages are considered cheaper to use because the > staff need less training - or assumed to be. I'm not so sure. That was the assumption with things like the 4GLs, but the modern crop of interpreted languages (Perl, Python, Ruby) are extremely expressive and well suited for complex applications which are primarily I/O bound. Java is a nice enough language - the culture OTOH means that Java applications are usually horrendous things full of explicit design pattern related names. -- Steve O'Hara-Smith