Simple APE2FLAC converter
Материал из RSU WiKi
(Различия между версиями)
Admin (обсуждение | вклад) |
Admin (обсуждение | вклад) (→См. также) |
||
(не показаны 2 промежуточные версии 1 участника) | |||
Строка 1: | Строка 1: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
#!/bin/bash | #!/bin/bash | ||
− | # Copyright (c) 2007 Juriy | + | # Copyright (c) 2007 Juriy Strashnov. All rights reserved. |
# | # | ||
# This program is free software; you can redistribute it and/or modify | # This program is free software; you can redistribute it and/or modify | ||
Строка 48: | Строка 48: | ||
echo "Work complete!" | echo "Work complete!" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | == | + | == См. также == |
+ | * [[CUE Audio-CD Image Splitter]] | ||
+ | * [[Simple APE2FLAC converter]] | ||
+ | * [[Полезности для работающих в командной строке *nix]] | ||
+ | * [[7 способов улучшить ваши shell скрипты на /bin/sh]] | ||
+ | * [[Simple web-gallery]] | ||
+ | * [[SuSE Linux]] | ||
+ | |||
+ | == Ссылки == | ||
* [http://tldp.org/LDP/abs/html/ Advanced Bash-Scripting Guide. An in-depth exploration of the art of shell scripting] | * [http://tldp.org/LDP/abs/html/ Advanced Bash-Scripting Guide. An in-depth exploration of the art of shell scripting] | ||
+ | |||
+ | {{Basement/Linux}} | ||
+ | |||
[[Category: Linux]] | [[Category: Linux]] | ||
[[Category: Bash]] | [[Category: Bash]] |
Текущая версия на 04:32, 19 ноября 2011
#!/bin/bash # Copyright (c) 2007 Juriy Strashnov. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published # by the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # Cheking if all needed programs are installed for PROGZ in perl mac flac; do WPROGZ=`which $PROGZ` if test $? -ne 0; then # Error message is printed by 'which' exit 1 fi done # Checking if APE files are presented in the directory WAPE=`ls *.ape 2>&1` if test $? -ne 0; then echo "No files to convert! Exiting." exit 1 fi # Converting APE->WAV->FLAC for j in *.ape; do nice mac "$j" "$j.wav" -d rm -f "$j" nice flac -8 "$j.wav" rm -f "$j.wav" echo "$j converted." echo "----------------------------" done echo "Renaming all \".ape.flac\" files to \".flac\"..." for i in *.ape.flac; do mv "$i" "${i/.ape.flac}".flac; done WCUE=`ls *.cue 2>&1` if test $? -ne 2; then for k in *.cue; do echo "CUE file $k found! Updating..." ls -1 -b *.cue | xargs perl -pi -w -e 's/.ape/.flac/g;'; done fi echo "Work complete!"
[править] См. также
- CUE Audio-CD Image Splitter
- Simple APE2FLAC converter
- Полезности для работающих в командной строке *nix
- 7 способов улучшить ваши shell скрипты на /bin/sh
- Simple web-gallery
- SuSE Linux