From owner-freebsd-questions Sun Oct 29 6:45: 5 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mailc.telia.com (mailc.telia.com [194.22.190.4]) by hub.freebsd.org (Postfix) with ESMTP id B9F1C37B479 for ; Sun, 29 Oct 2000 06:45:01 -0800 (PST) Received: from ents02 (t1o90p49.telia.com [195.67.216.49]) by mailc.telia.com (8.9.3/8.9.3) with SMTP id PAA09928; Sun, 29 Oct 2000 15:43:35 +0100 (CET) From: "James Wilde" To: "Peter" , "'freebsd-questions@freebsd.org'" Subject: RE: Trying to make something close to .bat file for dos on freebsd Date: Sun, 29 Oct 2000 15:44:22 +0100 Message-ID: <000e01c041b6$b9b98390$8208a8c0@iqunlimited.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Please don't send messages in html format to the list. A lot of people in here have mail clients which can't handle html. And it makes it difficult to show your message as a quoted message. > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Peter > Sent: Sunday, October 29, 2000 13:39 > To: 'freebsd-questions@freebsd.org' > Subject: Trying to make something close to .bat file for dos on freebsd > Hello > Im trying to make something close to bat for freebsd. But don't know where to start. I was thinking making so when i hit say "c" it auto connect start ssh and connect to a remote site. Sounds like what you need is a shell script. This is basically a text file containing the commands you want to issue. It is usual - I don't know whether it is necessary - to start a shell script with a comment line detailing the shell in which it is programmed. Mine all start: #!/bin/sh The trick is not to forget to change the mode so that they are executable. When a script is created it is not executable. And you have to specify the full path if it is not contained in a directory on your path, even if it is in the current directory. A good tip is to name your scripts something.sh for bourne shell scripts or something.csh for c-shell scripts and so on. As to what you can put in them: man sh Others will come in and tell you more or correct me if I am wrong on any point. mvh/regards James To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message