Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2000 08:43:24 -0600 (MDT)
From:      Nick Rogness <nick@rapidnet.com>
To:        Fotis Georgatos <fotis@ripe.net>
Cc:        Konstantin Chuguev <Konstantin.Chuguev@dante.org.uk>, freebsd-hackers@freebsd.org
Subject:   Re: Periodic scripts [Was: Re: /etc/security -> /etc/periodic/security ?]
Message-ID:  <Pine.BSF.4.21.0006300829350.98393-100000@rapidnet.com>
In-Reply-To: <Pine.BSI.4.05L.10006301309170.24628-100000@x21.ripe.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Jun 2000, Fotis Georgatos wrote:

> Why bother with complex shell scripts when you can have most
> needed functionality in a single C program?
> I've found myself replacing 10-20 lines of shell code with a single line.

	WHAT?  Are you crazy?  I've found just the opposite.
	What shell scripting are you using?  Example to find # of 
	duplicate usernames in your password file:

	#!/usr/local/bin/ksh
	VAR1=`awk -F: '{print $1}' /etc/passwd|grep -cx $1`
	print "Number of occurences of $1 in /etc/passwd: $VAR1"

	Let me see you replicate that in C in less than 2 lines...


Nick Rogness
- Speak softly and carry a Gigabit switch.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0006300829350.98393-100000>