Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: symbolic links and csh execution Message-ID: <7330@mimsy.UUCP> Date: Sat, 4-Jul-87 19:55:46 EDT Article-I.D.: mimsy.7330 Posted: Sat Jul 4 19:55:46 1987 Date-Received: Sun, 5-Jul-87 01:30:14 EDT References: > <2211@bunker.UUCP> <1097@mtune.ATT.COM> <500@its63b.ed.ac.uk> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 28 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 > #!(sed 1d | tbl | nroff -ms | lpr) > .PP > Hello. > .TS > a table > .TE > [etc...] `#!' is supposed to be *simple*. . . ! >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: #! /bin/sh tbl << '*end*of*text*' | nroff -ms | lpr .PP Hello. ... *end*of*text* -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: seismo!mimsy!chris