From owner-freebsd-questions Mon Sep 2 22:16:57 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3337B37B400 for ; Mon, 2 Sep 2002 22:16:52 -0700 (PDT) Received: from vectors.cx (manifold.vectors.cx [64.163.147.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAA9E43E42 for ; Mon, 2 Sep 2002 22:16:51 -0700 (PDT) (envelope-from monkey@vectors.cx) Received: from vectors.cx (8ec9ba528da046e080bab0f22dbf2083@localhost [127.0.0.1]) by vectors.cx (8.12.4/8.12.4) with ESMTP id g835Ia2e067358; Mon, 2 Sep 2002 22:18:36 -0700 (PDT) (envelope-from monkey@vectors.cx) Received: (from monkey@localhost) by vectors.cx (8.12.4/8.12.4/Submit) id g835IaQY067357; Mon, 2 Sep 2002 22:18:36 -0700 (PDT) (envelope-from monkey) Date: Mon, 2 Sep 2002 22:18:36 -0700 From: Adam Weinberger To: Kirk Bailey Cc: "freebsd-questions@freebsd.org" Subject: Re: sh script question Message-ID: <20020903051836.GZ56964@vectors.cx> References: <3D743DFF.B1DE6C8A@netzero.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D743DFF.B1DE6C8A@netzero.net> X-Editor: Vim 6.1 http://www.vim.org X-Mailer: Mutt 1.5 http://www.mutt.org X-URL: http://www.vectors.cx http://www.crackula.com User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG echo "#\!`which python`" > /final/path/to/script cat /rest/of/prepared/script >> /final/path/to/script mkdir /whatever/web/dir echo "${USER}@`hostname`" > /whatever/web/dir/email_file does this help at all? -Adam >> (09.02.2002 @ 2143 PST): Kirk Bailey said, in 1.4K: << > I want to write a script to install a python application. I has to locate the > interpreter, extract that path, and create the shebang declaration on the first > line, then append the remaining prepared script to that, create a directory > under the web cgi-bin, and create a pair of files in it with the owner's email > (and password in one of them). some of this is simple io, but I am pretty > unclear on the joining of strings and variable values, not to mention parsing > the output of whereis- or how to direct it's raw results into some sort of a > variable. Scripting can be very powerful, but I'm still something of a newbie at > this. Anyone interested in tossing an oar into my waters? > > -- > > end > > Respectfully, > Kirk D Bailey > > > +---------------------"Thou Art Free." -Eris-----------------------+ > | http://www.howlermonkey.net mailto:highprimate@howlermonkey.net | > | KILL spam dead! http://www.scambusters.org/stopspam/#Pledge | > | http://www.tinylist.org +--------+ mailto:grumpy@tinylist.org | > +------------------Thinking| NORMAL |Thinking----------------------+ > +--------+ > ------------------------------------------- > Introducing NetZero Long Distance > Unlimited Long Distance only $29.95/ month! > Sign Up Today! www.netzerolongdistance.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > >> end of "sh script question" from Kirk Bailey << -- "Oh good, my dog found the chainsaw." -Lilo, "Lilo & Stitch" Adam Weinberger adam@vectors.cx http://vectors.cx To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message