Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!hal!ncoast!allbery From: allbery@ncoast.UUCP Newsgroups: comp.unix.wizards Subject: Re: symbolic links and csh execution Message-ID: <2804@ncoast.UUCP> Date: Mon, 6-Jul-87 09:43:59 EDT Article-I.D.: ncoast.2804 Posted: Mon Jul 6 09:43:59 1987 Date-Received: Thu, 9-Jul-87 04:16:07 EDT References:> <2211@bunker.UUCP> <1097@mtune.ATT.COM> <500@its63b.ed.ac.uk> <7330@mimsy.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.wizards Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 30 As quoted from <7330@mimsy.UUCP> by chris@mimsy.UUCP (Chris Torek): +--------------- | In article <500@its63b.ed.ac.uk> simon@its63b.ed.ac.uk (Simon Brown) writes: | >I would quite like to use pipes, i/o redirection, shell-variables, etc... in | >a #! - for example | >I guess ``#!/bin/sh -c "sed -d $1 | tbl | nroff -ms | lpr"'' might work, | | No, because `#!' can create at most one argument, so this would | pass the string "-c \"sed -d $1 | tbl | nroff -ms | lpr\"" (in C | notation) to /bin/sh. What will work is this: +--------------- Has anyone considered writing a program which exec's /bin/sh with '-c'? This would allow: #! /bin/shio sed -d $1 | tbl | nroff | lpr Of course, you then need cshrun, etc., which defeats the intent of #!. ++Brandon -- ---- Moderator for comp.sources.misc and comp.binaries.ibm.pc ---- Brandon S. Allbery !cbosgd!ncoast!allbery (NOW!!!!) aXcess Company {ames,mit-eddie,harvard,talcott}!necntc!ncoast!allbery 6615 Center St. #A1-105 {well,sun,pyramid,ihnp4}!hoptoad!ncoast!allbery Mentor, OH 44060-4101 necntc!ncoast!allbery@harvard.HARVARD.EDU (Internet) +01 216 974 9210 ncoast!allbery@CWRU.EDU (CSnet -- if you dare) NCOAST ADMIN GROUP Brandon Allbery on 157/504 (Fidonet/Matrix/whatever) * ncoast -- Public Access UN*X -- (216) 781-6201, 24 hrs., 300/1200/2400 baud * * ncoast is proud to be carrying alt.all -- contact me for more information *