Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 1995 09:50:36 +0100
From:      Terje Thoegersen <Terje.Thogersen@hda.hydro.com>
To:        ram@mail.bw.lgca.ohio.gov
Cc:        questions@freebsd.org
Subject:   Re: Info...PLEASE  :-)
Message-ID:  <199511290850.AAvkhdib01106495@hda.hydro.com>
In-Reply-To: <Pine.NEB.3.91.951128104512.580A-100000@mail.bw.lgca.ohio.gov> (message from Ronald Matuszak on Tue, 28 Nov 1995 10:53:09 %2B0000 ())

next in thread | previous in thread | raw e-mail | index | archive | help
> 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
--------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511290850.AAvkhdib01106495>