Link to home
Start Free TrialLog in
Avatar of joaotelles
joaotellesFlag for United States of America

asked on

Shell script - add ) at the end of each line

Hi,

What would be the sed commend to add a ) at the end of each line of a txt file that has 3M lines like this...

FileData(ORIGINATOR, 3343437)
{
CreateSubscription(){DestinationAddress(50522200010) Imsi(710210132268827
CreateSubscription(){DestinationAddress(50522200011) Imsi(710210132266017
CreateSubscription(){DestinationAddress(50522200012) Imsi(710210132266018
CreateSubscription(){DestinationAddress(50522200013) Imsi(710210132266019
CreateSubscription(){DestinationAddress(50522200014) Imsi(710210132266020
CreateSubscription(){DestinationAddress(50522200015) Imsi(710210132266021
CreateSubscription(){DestinationAddress(50522200016) Imsi(710210132266022

Tks.
Joao
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you want to add ) at the end of lines with that start with CreateSubscription, then command would be:

sed'/CreateSubscription.*/&)/' filename

Open in new window

Avatar of joaotelles

ASKER

tks