How to create a simple copy script?

ran, but the results are the same. The copy function did not occur.

Enterprise:~ user$ awk -F'[/.]' '{print "cp " $0 " " $0 "/../"$(NF-1)".dat"}' infile 
cp /Users/config/backup/install.deploy /Users/config/backup/install.deploy/../install.dat
cp /Users/config2/backup/install.deploy /Users/config2/backup/install.deploy/../install.dat
cp /Users/config3/backup/install.deploy /Users/config3/backup/install.deploy/../install.dat

sorry, 2 levels up:

nawk -F'[/.]' 'NF{print "cp " $0 " " $0 "/../../"$(NF-1)".dat"}' myFile

I tried the same command above, and it did not copy.

Any ideas?

---------- Post updated 09-30-11 at 04:41 AM ---------- Previous update was 09-29-11 at 12:41 PM ----------

Guys,
anyone else want to assist in this?

for all the experienced unix guys this isnt a very tough problem...

thanks

---------- Post updated at 09:56 AM ---------- Previous update was at 04:41 AM ----------

I tried to change the above code to:

awk -F'[/.]' 'NF{print "cp " $0 " " $0 "/.."$(NF-1)".dat"}' infile

But still the issue is not resolved.

Any ideas by anyone?