From owner-freebsd-questions Wed Nov 29 00:52:23 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id AAA21980 for questions-outgoing; Wed, 29 Nov 1995 00:52:23 -0800 Received: from hda.hydro.com (vkhdib01.hda.hydro.com [136.164.216.55]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id AAA21973 for ; Wed, 29 Nov 1995 00:52:11 -0800 Received: by hda.hydro.com id ; Wed, 29 Nov 1995 09:50:36 +0100 Date: Wed, 29 Nov 1995 09:50:36 +0100 From: Terje Thoegersen Message-Id: <199511290850.AAvkhdib01106495@hda.hydro.com> To: ram@mail.bw.lgca.ohio.gov Cc: questions@freebsd.org In-Reply-To: (message from Ronald Matuszak on Tue, 28 Nov 1995 10:53:09 +0000 ()) Subject: Re: Info...PLEASE :-) Sender: owner-questions@freebsd.org Precedence: bulk > A few questions.. We are running FreeBSD 2.1.0. We are in the process > of making many accounts. We are using a home brew make user script. All > was well until we had about 126 accounts in a single group ID. > > Our question is......Is there a limit to the number of characters in a > single line in the etc/group file?? We made another group ID # and it > worked. However, we were wondering if there was a way to get all of these > accounts in a single group? Try creating two groups with the same GID, putting half of the users in each. Never tried it on FreeBSD, but it works under SVR3.2. > > Also, for general knowledge, is there a command to count the number of > characters in a line of standard input (Through piping, etc.) > > Finally, I was wondering if you could direct me in creating functions for > sh scripts. What format is required for this? Two birds with one stone : #!/bin/sh LINE=`cat` Countem () { NUMCHARS=`echo $1 | wc -c` echo "There are $NUMCHARS characters in the stdin\n$1" } Countem "$LINE" -Terje ____________________________________________________________________ Terje Thoegersen, Systems Consultant | terje.thogersen@hda.hydro.com Norsk Hydro a.s, Hydro Data | Tel : +47 2273 9298 P.O.Box 200, | Fax : +47 2273 9614 1321 Stabekk, Norway | Pager : 966 32801 --------------------------------------------------------------------