sed 's/$OLD/$NEW/' $file -I know this will only
search and replace but how do I do in in-place so that the file itself is
modified.*
sed -a 's/old/new/wfilename' filename
It is explained in:
cd /usr/share/doc/usd/15.sed/; make paper.txt; less paper.txt
Why dont you use
On Fri, Apr 04, 2008 at 01:07:10AM -0700, Parvinder Bhasin wrote:
I am writing up a script to automatically increment the serial number of
bind dns zone file , but I am running across issues doing in place
substitution with either sed or even perl for that matter. I can do
this easily in
On Fri, Apr 4, 2008 at 10:07 AM, Parvinder Bhasin
[EMAIL PROTECTED] wrote:
I am writing up a script to automatically increment the serial number of
bind dns zone file , but I am running across issues doing in place
substitution with either sed or even perl for that matter. I can do this
On 2008-04-04, Parvinder Bhasin [EMAIL PROTECTED] wrote:
OLD=`grep serial $file | awk '{print $1}'`
NEW=$(($OLD + 1))
*perl -p -i -e 's/$OLD/$NEW/' $file
hopefully the other posts should get you going, but beware!
also search for the text 'serial' when you do the
On Fri, Apr 04, 2008 at 01:07:10AM -0700, Parvinder Bhasin wrote:
Hi!
*perl -p -i -e 's/$OLD/$NEW/' $file --tried using perl
but still the file didn't change with the incremented serial number
sed 's/$OLD/$NEW/' $file -I know this will only
search
Parvinder Bhasin [EMAIL PROTECTED] writes:
I am writing up a script to automatically increment the serial number
of bind dns zone file , but I am running across issues doing in place
substitution with either sed or even perl for that matter. I can do
this easily in Linux but am having hard
6 matches
Mail list logo