Re: Using sed to append line for multiple conditions

From: John W. Krahn (someone_at_example.com)
Date: 11/01/05


Date: Tue, 01 Nov 2005 00:52:24 GMT

stephenfu1@gmail.com wrote:
>
> Im trying to the append "_DOB_RANGE" to the end of each line if any of
> the following strings are contained in the current line:
>
> birthDateEnd
> birthDateStart
> deathDateStart
> deathDateEnd

perl -lpe'/(?:birth|death)Date(?:Start|End)/ && $_ .= "_DOB_RANGE"'

John

-- 
use Perl;
program
fulfillment


Relevant Pages