Bash script using "cp" ...?
I am very new to the scripting world and I am trying to write a simple script to do copying of some files. I would like to use a wildcard to copy just the "*.abc" files from one directory to another. Below is the line I am using, but it does not seem to work within my script but if typed into the terminal it works fine. Can someone tell me what I'm doing wrong? Any help will be appreciated.
cp -i "/home/me/testdir/*.abc" "/etc/opt/testcopy/"
(both directories exist and again if this is typed on the cmd line it works fine but fails with the error message: "cp: cannot stat '/home/me/testdir/*.abc"