Same thing but I use
:1,$s/dog/cat/g
where 1 is line 1
where $ is end of file
so if you wanted just to change lines 1 thru 30 you could do
:1,30s/dog/cat/g
Mike
"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."