need a script to redirect the command prompt data int a log file.

Hello forum memebers,

I have to write a script to copy command arguments into a log.please see the below issue and help me to complete it.
i have command "mkidcfg" it is custiomized.I will run the command with one arguments .
mkidcfg -I _config.db_ids it will open the below options.

1 - Search for an ID
2 - Add an ID
3 - Update an ID
0 - Exit
Option: 2
Tag: a_app_cc
ID: mas
Password: mas123
1 - Search for an ID
2 - Add an ID
3 - Update an ID
0 - Exit
Option: 0

So now i want redirect the entire the data into one log file.when i open the log file . cat log
the below should be display.

1 - Search for an ID
2 - Add an ID
3 - Update an ID
0 - Exit
Option: Tag: a_app_cc - mas - mas123 .
1 - Search for an ID
2 - Add an ID
3 - Update an ID
0 - Exit

please help to me to write a script to done the above issue.I am looking forward from you....:b:

Thanks & Regards
rajkumar_g

# script -f logfile
# mkidcfg -I _config.db_ids

when you finish your job (when mkidcfg is closed)

# exit
# cat logfile 

Can u please suggest me how to solve this is issue.

first command have to work then it have print in the log file.what are the operations done on th screen should be copy in log file.

please suggest any solution.:b:
Its urgent.

Thanks in Advance
rajkumar g