Le mercredi 17 juin 2015, 10:07:04 Guillaume a écrit : > Bonjour, > > Personnellement j'utiliserais plutôt la commande find que la > commande ls > > exemple : > > find /home/klaus/.../ -type f -name *.mpg -exec Encode {} \; > > Le 17/06/2015 09:54, Klaus Becker a écrit : > > Salut, > > > > dans un dossier j'ai plein de fichiers mpg que je souhaite recoder > > avec Encode (qui m'est d'une grande utilité) avec le script : > > > > for file in $(ls /home/klaus/.../*.mpg); do > > > > Encode $file > > > > done > > > > Or le script traite tous les fichiers (presque) en même temps, > > puis > > s'arrête en disant qu'il ne trouve pas les fichiers mpg. > > > > Comment faire pour que les fichiers soient traités un par un, le > > 2e > > seulement lorsque le traitement du 1er est terminé ? > > > > librement > > > > Klaus > > Cordialement, > Guillaume
merci pour les solutions proposées, mais toutes donnent le même résultat, alors que Encode fonctionne lorsque je lui indique un seul fichier : $ bash encode.sh /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch5 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch5.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch5.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch6 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch6.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch6.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch7 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch7.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch7.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch8 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch8.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch8.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts $ bash encode.sh /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch5 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch5.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch5.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch6 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch6.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch6.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch7 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch7.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch7.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch8 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch8.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch8.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch9 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch9.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch9.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) /home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch9 Passe: 0 VBirate: SBitrate: 64 FILTRE: Son: x Format: 640 x 496 Filtre utilisé: scale=640:496 Format: MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team File not found: '..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch9.mpg' Failed to open ..//home/klaus/multimedia/video/fifinette/dreambox/dschungelbuch/dschungelbuch9.mpg. Cannot open file/device. Exiting... MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) MPlayer SVN-r37401 (C) 2000-2015 MPlayer Team Error parsing option on the command line: -lavcopts Exiting... (error parsing command line) -- Lisez la FAQ de la liste avant de poser une question : http://wiki.debian.org/fr/FrenchLists Pour vous DESABONNER, envoyez un message avec comme objet "unsubscribe" vers debian-user-french-requ...@lists.debian.org En cas de soucis, contactez EN ANGLAIS listmas...@lists.debian.org Archive: https://lists.debian.org/11209489.fJBWSE2Lgj@1stein