How To Use cp In A Script
Okay, here's what I'm trying to do: I dug out my old X-Wing Win95 game and played it. It updated my pilot, who is named onyx.plt. Back in the day, I had a .bat file that would copy my updated onyx.plt to several other *.plt files so that I could use that pilot as a super-wingman. Since I'm now running X-Wing under 9.04, I wanted to make a script (that's what the functional equivalent of a DOS .BAT file is, right?). I looked stuff up out there on the interwebs, and I changed my old file from this (MS-DOS):
Code:
copy onyx.plt 1.plt
copy onyx.plt 2.plt
copy onyx.plt 3.plt
copy onyx.plt 4.plt
copy onyx.plt 5.plt
copy onyx.plt mulder.plt
copy onyx.plt scully.plt
copy onyx.plt no-use.plt
to this:
Code:
cp -u onyx.plt 1.plt
cp -u onyx.plt 2.plt
cp -u onyx.plt 3.plt
cp -u onyx.plt 4.plt
cp -u onyx.plt 5.plt
cp -u onyx.plt mulder.plt
cp -u onyx.plt scully.plt
cp -u onyx.plt no-use.plt
by which I'm trying to say "copy (update only) onyx to whatever"
However, when I run the script by double-clicking on it and then clicking "Run in Terminal", I get *extra* files with the names above, but they don't replace the old ones. The new names seem to have an extra space after .plt.
Now, this is my first-ever script in Linux, and I am very, very ignorant. Would someone please help me out of my ignorance and tell me what I'm doing wrong? I'm happy to read something else, but I'm afraid I'll end up looking in the wrong spot.
Thanks in advance.
Eric
It is tragically wrong to believe that the advancement of humanity must occur at the pace of its slowest members. - Zefram Cochrane, Federation (by Judith and Garfield Reeves-Stevens)
Bookmarks