Afficher un message
Vieux 25/08/2006, 00h14   #6
Chris F.A. Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Trying to copy all *.csv files to another directory but fails -

On 2006-08-24, phillip.s.powell@gmail.com wrote:
> # NOW WE COPY EVERYTHING OVER TO THE NEW FOLDERS IN $csvBackupPath
> cp -pr "$clientDocPath/*.csv" "$csvBackupPath/clientCSV"
> cp -pr "$projectDocPath/*.csv" "$csvBackupPath/projectCSV"
>
> This code I thought would simply copy everything ending in ".csv" to
> another directory, but I get the following error:
>
> No such file or directory *.csv


Filenames are not expanded inside quotes:

cp -pr "$clientDocPath/"*.csv "$csvBackupPath/clientCSV"
cp -pr "$projectDocPath/"*.csv "$csvBackupPath/projectCSV"

--
Chris F.A. Johnson, author <http://cfaj.freeshell.org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
  Réponse avec citation
 
Page generated in 0,04588 seconds with 9 queries