From owner-freebsd-questions Fri Aug 24 11: 7:34 2001 Delivered-To: freebsd-questions@freebsd.org Received: from exchange.twowaytv.co.uk (smeg.twowaytv.co.uk [194.6.2.163]) by hub.freebsd.org (Postfix) with ESMTP id BCBAD37B40A for ; Fri, 24 Aug 2001 11:07:17 -0700 (PDT) (envelope-from alex@twowaytv.co.uk) Received: from localhost (alex@localhost) by r2d2.twowaytv.co.uk (8.11.1/8.11.1) with ESMTP id f7MDj5j23123; Wed, 22 Aug 2001 14:45:05 +0100 (BST) (envelope-from alex@twowaytv.co.uk) X-Authentication-Warning: r2d2.twowaytv.co.uk: alex owned process doing -bs Date: Wed, 22 Aug 2001 14:45:05 +0100 (BST) From: Alex Dyas Reply-To: To: Odhiambo Washington Cc: FBSD-Q Subject: Re: One for the script gurus In-Reply-To: <20010822163649.B98728@ns2.wananchi.com> Message-ID: <20010822144333.H91302-100000@r2d2.twowaytv.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Assuming you're only interested in home directories, this is one way of doing it: for dir in `grep '\/home' /etc/passwd | cut -d':' -f6`;do mkdir $dir;done alex.. On Wed, 22 Aug 2001, Odhiambo Washington wrote: > You have your /etc/passwd file and from it you want to create a home > directory for every user in it. I am imagining how to extract that info > from the file and use it to feed some script that would do what I want. > I am imagining some emergency situation where my /home tape backup has > goofed. > I leave it you to, please. > > Thanks. > > -Wash > > -- > Odhiambo Washington > Wananchi Online Ltd., > wash@wananchi.com 1st Flr Loita Hse. > Tel: 254 2 313985 Loita Street., > Fax: 254 2 313922 PO Box 10286,00100-NAIROBI,KE. > > In case of doubt, make it sound convincing. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message