From owner-freebsd-questions@FreeBSD.ORG Wed Feb 2 09:52:00 2005 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 2237816A4CE for ; Wed, 2 Feb 2005 09:52:00 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A72C43D31 for ; Wed, 2 Feb 2005 09:51:59 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j129pm8G018485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Feb 2005 01:51:49 -0800 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.10/Submit) id j129pgAq018483; Wed, 2 Feb 2005 01:51:42 -0800 X-Authentication-Warning: hosea.tallye.com: sttng359 set sender to lorenl@alzatex.com using -f Date: Wed, 2 Feb 2005 01:51:42 -0800 From: "Loren M. Lang" To: Eric Kjeldergaard Message-ID: <20050202095142.GQ8619@alzatex.com> References: <20050131110432.GD8619@alzatex.com> <20050201041642.GA1733@oliverfuchs.onlinehome.de> <20050201055342.GC776@gothmog.gr> <20050201112315.GH8619@alzatex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C cc: Giorgos Keramidas cc: "Loren M. Lang" cc: FreeBSD Mailing list Subject: Re: mounted ext2 fs causes bad shutdown 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: Wed, 02 Feb 2005 09:52:00 -0000 On Tue, Feb 01, 2005 at 07:58:34AM -0600, Eric Kjeldergaard wrote: > > > One of the many ways to do the same thing without the bugs could be: > > > > > > # extfs=$(mount | grep '^/.*(ext2fs,' | awk '{print $1}') > > > > Actually, better than that would be extfs=$(mount -t ext2fs | awk '{print $1;}') > > Or even just replace the whole thing with "umount -a -t ext2fs" > > > > While we're at it, isn't awk a bit of overkill? Seems that the > following would do: > > extfs=$(mount -t ext2fs | cut -d ' ' -f1) How about save a few more bytes and do: extfs=`mount -text2fs|cut -d\ -f` But "umount -a -text2fs" is the shortest version since it doesn't even need a loop, it does everything in one command. > > Every cycle counts :p > > -- > If I write a signature, my emails will appear more personalised. -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C