Modify files through scripts

Hello, all

I want to implement some actions on the specified files, to modify some contents in the files, as follows:
File1:
****
name carol
birthday 830319
*******
name billy
birthday 831001
***************

____________________________
The asterisks mean there are a lot of other contents. I want to write a script to change the file as " Modify.ksh File1 000101" to modify all the birthdays to 000101? Are there any suggestions? For the easy way

NOTE: In the file, the birthday only appears in the two places.

You could embed this sed script in a shell script to do what you like

sed -i -e "s/birthday/& 000101/g" File1
#! /bin/ksh
# Assuming File1 and new BirthDate comes always
#
sed -i -e "s/birthday/& $2/g" $1

You need to have GNU sed to get the -i flag.

Thank you for your reply, VINO....

But if there is no installation of the GNU sed, are there any other options? Because this situation happened on me and I have no right to do an installation, so sad...

then you can pipe the output to a newfile and rename it back to original if desired