From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 28f2855c for ; Tue, 7 Jan 2020 05:05:15 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 30A379BB69; Tue, 7 Jan 2020 15:05:14 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 7BD0E951B1; Tue, 7 Jan 2020 15:04:41 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 9E1D7951B1; Tue, 7 Jan 2020 15:04:38 +1000 (AEST) Received: from cuzuco.com (v.cuzuco.com [166.84.7.17]) by minnie.tuhs.org (Postfix) with ESMTP id 22E3495196 for ; Tue, 7 Jan 2020 15:04:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by cuzuco.com (8.14.9/8.13.3) with SMTP id 00753dBd029629; Tue, 7 Jan 2020 00:03:50 -0500 (EST) Date: Tue, 7 Jan 2020 00:03:39 -0500 (EST) Message-Id: <202001070503.00753dBd029629@cuzuco.com> From: Brian Walden To: Subject: Re: [TUHS] sh: cmd | >file X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Clem Cole wrote: >A heretic!! Believers all know '*Bourne to Program, Type with Joy' *and* >'One true bracing style' *are the two most important commandments of UNIX >programmer! > >Seriously, I still write my scripts as v7 and use (t)csh as my login shell >on all my UNIX boxes ;-) > >Clem You know what's amazing? that Bill Joy code to launch either csh or bourne shell based on the first character of teh file is still in tcsh codebase today. It even has #! support just in case your kernel does not. However this code never gets run as who write scripts without #! anymore .. but here's a little test --- $ tcsh You have 2 mail messages. > cat x1.sh PATH=/bin echo $SHELL > ./x1.sh /bin/sh > cat x2.csh # setenv path /bin echo $shell > ./x2.csh /usr/local/bin/tcsh > exit you can see it in https://github.com/tcsh-org/tcsh/blob/master/sh.exec.c -Brian