aixdude@yahoo.com wrote:
> On Mar 24, 1:08Âpm, "aixd...@yahoo.com" <aixd...@yahoo.com> wrote:
>> only want to report first line, each time ÂPNAM= value changes
>> second field delimited by | character
>> sample of source file
>>
>> STAR=20080317 20:43:59|PNAM=ABSPC103
>> STAR=20080318 20:42:53|PNAM=ABSPC103
>> STAR=20080319 20:43:27|PNAM=ABSPC103
>> STAR=20080320 20:43:00|PNAM=ABSPC103
>> STAR=20080321 20:41:41|PNAM=ABSPC103
>> STAR=20080301 01:41:49|PNAM=ACFPC360
>> STAR=20080302 02:35:03|PNAM=ACFPC360
>> STAR=20080303 01:10:23|PNAM=ACFPC360
>> STAR=20080319 03:56:12|PNAM=EDIPP757
>> STAR=20080320 03:54:41|PNAM=EDIPP757
>> STAR=20080321 03:55:14|PNAM=EDIPP757
>> STAR=20080322 03:53:57|PNAM=EDIPP757
>> STAR=20080301 12:02:48|PNAM=HHRAC010
>> STAR=20080301 18:02:48|PNAM=HHRAC010
>> STAR=20080303 12:04:33|PNAM=HHRAC010
>>
>> etc
>
> I would also like to grab fields starting with SFIL= and DFIL=
> however these fields are NOT consistently in the same field position
> of every line
Provide sample input and expected output.
--
All the commands are tested with bash and GNU tools, so they may use
nonstandard features. I try to mention when something is nonstandard (if
I'm aware of that), but I may miss something. Corrections are welcome.