From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076339121674.tru64-unix-managers.marc@archive.invalid> From: Christophe DIARRA Date: Wed, 25 Sep 1996 13:54:37 +0000 To: tru64-unix-managers Subject: SUMMARY: ed editor: 512 bytes per line limit X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076339121674 Greetings, Thanks to persons who responded: Sigismondo Boschi Paul Tyler Kurt Carlson davis@decatl.alf.dec.com Murthy Hebbar 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 ***