how to cp files to dir,using routine?

hi all,

I wanted to know how we can copy files to dirs, through a routine and when the file and the dir are specified as parameters for that routine and explicitly called?

Eg: suppose i want to copy file1 to /tmp then

myproc()
{
.
.
}

myproc /path/file1 /tmp/
These parameters when passed to the myproc() ,file1 should be copied to /tmp

May i know how it can be done?

No duplicate or cross-posting, read the rules.

Proceed here:

http://www.unix.com/shell-programming-scripting/66124-how-cp-files-dir-using-routine.html\#post302197713

Thread closed.