| |||||||||||
| |||||||||||
Extracting some fields from a data File Posted by perlnewuser (perlnewuser), 29 June 2004 Hi ,I have input file like this (fields separator is "," lines separator is "\n"): header, 06-12-2004, path, /usr/bin/sh,attribute, 100555,root,other,315,565690, subject,bscs,sgrp,9936,6785,0 0, return,success,0 header, 06-12-2004, path, /usr/bin/sh,attribute,100555,dba,5, subject,bscs,sgrp,9936,6785,0,return,success,0 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 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 header, 06-12-2004, path, /usr/bin/sh, subject,bscs,sgrp,9936,6785,0 0,return,success,0 header, 06-12-2004, path, /usr/bin/sh, subject,bscs,sgrp,9936,6785,0 0,return,success,0 Thanks a lot , CHAFIK Posted by admin (Graham Ellis), 29 June 2004 TryCode:
This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |