From owner-freebsd-questions Sun Sep 17 13:49:10 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mta05-svc.ntlworld.com (mta05-svc.ntlworld.com [62.253.162.45]) by hub.freebsd.org (Postfix) with ESMTP id 71F0F37B424 for ; Sun, 17 Sep 2000 13:49:06 -0700 (PDT) Received: from parish ([62.255.96.158]) by mta05-svc.ntlworld.com (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP id <20000917204901.KCYJ317.mta05-svc.ntlworld.com@parish>; Sun, 17 Sep 2000 21:49:01 +0100 Received: (from mark@localhost) by parish (8.11.0/8.11.0) id e8HKn0W07464; Sun, 17 Sep 2000 21:49:00 +0100 (BST) (envelope-from mark) Date: Sun, 17 Sep 2000 21:49:00 +0100 From: Mark Ovens To: mel anthony Cc: freebsd-questions@freebsd.org Subject: Re: shell scripts? Message-ID: <20000917214900.C257@parish> References: <20000917202952.29871.qmail@web1405.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20000917202952.29871.qmail@web1405.mail.yahoo.com>; from acidrop50@yahoo.com on Sun, Sep 17, 2000 at 01:29:52PM -0700 Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Sep 17, 2000 at 01:29:52PM -0700, mel anthony wrote: > hey, im wondering about shell scripts, how do i > make them, and do i have to use a certain > language, and also, how do i make them a > permanent part of the shell?, any help would be > greatly apprechiated. > A shell script is just a bunch of commands (both builtin shell commands and normal Unix utilities, cp(1), ls(1), etc.) stuffed in a file which is made executable and then run from the command line. Normally sh(1) is used for shell scripts (although any shell can be used. If the first line is: #! /bin/sh then it's a Bourne (sh(1)) shell script. Take a look at /etc/periodic/{daily,weekly,monthly} for examples. If you need to ask such basic questions (please don't take offence, I'm not being patronizing) then you should get a good book on the subject. One I would recommend is The Unix Programming Environment by Brian W. Kernighan (the 'K' in 'K&R') and Rob Pike, Prentice-Hall, ISBN 0-13-937681-X. I'm sure there are some good tutorials on the Web but I don't know any URLs. Also checkout the sh(1) manpage. HTH > > M > > __________________________________________________ > Do You Yahoo!? > Yahoo! Mail - Free email you can access from anywhere! > http://mail.yahoo.com/ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- 4.4 - The number of the Beastie ________________________________________________________________ 51.44°N FreeBSD - The Power To Serve http://www.freebsd.org 2.057°W My Webpage http://ukug.uk.freebsd.org/~mark mailto:marko@freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message