1830008 Members
2445 Online
109998 Solutions
New Discussion

sed questions

 
Anwar D Singh
Occasional Contributor

sed questions

Hi, using the sed command,

1. how can I append 3 stars to the end of the line starting with Fred.

2. Also using the sed command, how can I change Fred's b-day 11/14/46.

Fred Fardbarkle:674-843-1385:20 Parak Lane, DeLuth, MN 23850:4/12/23:780900

Thanks.
2 REPLIES 2
Pete Randall
Outstanding Contributor

Re: sed questions

Here, this may come in handy (see attached).

Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: sed questions

Hi:

# sed -e '/Fred/s/$/***/'

# sed -e '/Fred/s%4/12/23%11/14/46%'

Regards!

...JRF...