From: mohammed chafik <mailto:[EMAIL PROTECTED]> wrote:
: Hi all, : : I have input file like this: : -------------------------------------------------------------- : ---------- : header, 06-12-2004, path, : /usr/bin/sh,attribute,100555,root,other,315,565690, : subject,bscs,sgrp,9936,6785,0 0,return,success,0 (line1) : : header, 06-12-2004, path, /usr/bin/sh,attribute,100555,dba,5, : subject,bscs,sgrp,9936,6785,0 ,return,success,0 (line2) : : header, 06-12-2004, path, : /usr/bin/sh,attribute,100555,tom,other,315,56,11,54,77,10,88, : subject,bscs,sgrp,9936,6785,0 0,return,success,0 (line3) : -------------------------------------------------------------- : --------- Is the "subject" field always the second to last filed? : I need to generate an output file like this (deleting fields : between attribute and subject, please : note that number of those fields is variable): : -------------------------------------------------------------- : --------------------- : header, 06-12-2004, path, /usr/bin/sh, : subject,bscs,sgrp,9936,6785,0 0,return,success,0 (line1) : : header, 06-12-2004, path, /usr/bin/sh, : subject,bscs,sgrp,9936,6785,0 0,return,success,0 (line 2) : : header, 06-12-2004, path, /usr/bin/sh, : subject,bscs,sgrp,9936,6785,0 0,return,success,0 (line 3) : -------------------------------------------------------------- : --------------------- What determines the extra spacing that appears between the "subject" field and the last fields (" (line1)", " (line2)", " (line3)", etc.)? Or is that just a typo? HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>