tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Christophe DIARRA <diarra () ipno ! in2p3 ! fr>
To: tru64-unix-managers
Subject: SUMMARY: ed editor: 512 bytes per line limit
Date: Wed, 25 Sep 1996 13:54:37 +0000	[thread overview]
Message-ID: <96076339121674.tru64-unix-managers.marc@archive.invalid> (raw)

Greetings,

Thanks to persons who responded:

Sigismondo Boschi <net1701@comune.bologna.it>
Paul Tyler <pct@lister.anp.ansto.gov.au>
Kurt Carlson <sxkac@java.sois.alaska.edu>
davis@decatl.alf.dec.com
Murthy Hebbar <murthy@dicer.incyte.com>

My apologies if I missed any one who replied

I have the solution to my problem. Alan Davis gave it to me. Following
is his answer:

*************** SOLUTION (From: davis@decatl.alf.dec.com) *************
Christophe,
 
  This is a well-known problem that dates back to Ultrix and
BSD. Here is the workaround :
 
WORKAROUND:
 
The workaround is to modify the adduser script to use "awk" instead of "cut"
as follows:
 
1. For those lines with cut -d: -f4:
      change cut to awk
      change -d: to -F:
      change -f4 to '{print $4}'
 
2.  Also change the ed lines to use sed instead:
 
#               ed /etc/ptmp/group > /dev/null << EOF
#               /^${LOGGROUP}:/s/\$/,${USER}/
#               g/:,/s//:/
#               w
#               q
#EOF
                sed "/^${LOGGROUP}:/s/\$/,${USER}/" /etc/group | \
                sed "/:,/s//:/" > /etc/ptmp/group
 
3. Also change the following ed lines to use sed instead:
 
#               ed /etc/ptmp/group > /dev/null << EOF
#               /^${GROUP}:/s/\$/,${USER}/
#               g/:,/s//:/
#               w
#               q
# EOF
                sed "/^${GROUP}:/s/\$/,${USER}/" /etc/group | \
                sed "/:,/s//:/" > /etc/ptmp/group 
Alan Davis/dusg
********************** END SOLUTION *****************************

My original request was:

> I am using a modified 'adduser' script to add new users under NIS. Now
> I am unable to update the /var/yp/src/group file because I have lines 
in this
> file those length are greater than 512 bytes: I have groups with near
> 100 users each. ed is used to process the passwd and group files and now
> ed can't read the group file because of the length of some lines.
> 
> Is there a way to solve my problem ? Where can I find a version of ed
> which can process lines greater than 512 bytes ?
> 
> Do I need to rewrite my adduser script using an other text editor ?
> 
> Thanks in advance.

***
Christophe DIARRA
Institut de Physique Nucleaire
Bat 100 - S2I
91406 ORSAY Cedex
Tel: (16 1) 69 41 65 60
E-mail: diarra@ipno.in2p3.fr
***

                 reply	other threads:[~1996-09-25 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox