From owner-freebsd-questions@FreeBSD.ORG Wed Apr 2 18:52:29 2003 Return-Path: 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 EDB9937B401 for ; Wed, 2 Apr 2003 18:52:29 -0800 (PST) Received: from dragoncrest.jasnetworks.net (dragoncrest.jasnetworks.net [65.194.254.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3971E43FB1 for ; Wed, 2 Apr 2003 18:52:29 -0800 (PST) (envelope-from dragoncrest@voyager.net) Received: from works.voyager.net (works.jasnetworks.net [192.168.0.2]) h32Kw7cQ002325 for ; Wed, 2 Apr 2003 20:58:07 GMT (envelope-from dragoncrest@voyager.net) Message-Id: <5.2.0.9.2.20030402205519.00a05e10@pop.voyager.net> X-Sender: dragoncrest@pop.voyager.net X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 02 Apr 2003 20:57:48 -0500 To: freebsd-questions@FreeBSD.ORG From: Dragoncrest Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Technical question about scripts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2003 02:52:30 -0000 I've got a bit of a technical question about doing scripts. I've created a script that I use for expediting changes to one of my servers to save me a large number or repetitive steps that I have to do. My question is this though. Using either Pico or VI I need to be able to have the script know if I've saved/changed the file or if I just exited out without saving my changes. Cause if I exited out without saving changes, I want it to abort the rest of the script, but if I changed any one of my config files, I want it to then complete the rest of the script. Anyone know how to do this via a shell script?