[SunHELP] sed-help
Adrian.Florea at alcatel.ro
Adrian.Florea at alcatel.ro
Mon Dec 9 01:57:16 CST 2002
Try:
perl -pi -e 's/86400/30/;' db.file
it is easier and does not need to do by hand any temporaries.
best regards,
Adrian FLOREA
On Mon, 9 Dec 2002, Sangbutsarakum, Patai wrote:
> #!/dear/scripter
>
> I need to modify thousands of db files in my DNS server.
> I need to change 86400 in line
> ' 86400 ; Minimum timer - 1 day'
> to be 60
> and 43200 in lin
> ' 43200 ; Refresh timer - 12 hours'
> to be 3600
>
> in every file of db file directory.
>
> I've try with sed -e 's/86400/30/' db.file
> but the modified file only show on stdout not directly modify the file's
> content.
>
> $TTL 86400
> @ IN SOA ns1.xxx.com. hostmaster.xxx.com. (
> 2001100201 ; Serial number
> 43200 ; Refresh timer - 12 hours
> 3600 ; Retry timer - 1 hour
> 604800 ; Expire timer - 1 week
> 86400 ; Minimum timer - 1 day
>
> Pleases suggest,
> Patrick.
> _______________________________________________
> SunHELP maillist - SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
More information about the SunHELP
mailing list