06-12-2007
Music cd burn
Allo.
I do a program using shell script to burn cds and dvds because I don't want to install one with kde or gnome dependance. I want to optimize one of my shell script. this shell script is to burn music cds. I juste have to go in shell and write :
burn_cd_music audio1.mp3 audio2.mp3 audio1.ogg audio1.wav
and the shell script copy file in /tmp/cd_temp, converte them in .wav and burn the cd. It's fonctionnal, but I don't want to have temporary file.....
Can I use pipe or buffer to do that, and how?
Sorry for my english, if you don't understand, I will try to better explain
Give me you ideas
My script is:
#!/bin/bash
#do a liste of the mp3 files and one for the ogg file
for i in $@
do
j=`echo $i | cut -f2 -d '.'`
if test $j = 'ogg'
then
list1="$list1 $i"
fi
if test $j = 'mp3'
then
list2="$list2 $i"
fi
done
#copy the file in /tmp/cd_temp (I don't want to do this)
mkdir /tmp/cd_temp
for i in $@
do
cp $i /tmp/cd_temp/
done
#go at the files directory
cd /tmp/cd_temp
#convert the ogg file in wav file
for i in list1
do
sox `basename $i .ogg`.ogg `basename $i .ogg`.wav
rm `basename $i .ogg`.ogg
done
#convert the mp3 file in wav file
for i in list2
do
mpg123 -w `basename $i .mp3`.wav $i
rm `basename $i .mp3`.mp3
done
#burn CD
cdrecord dev=ATA:0,0,0 -eject speed=2 -pad -audio *.wav
#erase the temporary file
rm -r /tmp/cd_temp/
3 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hallo,
who can help me to configure a scsi cd writer to my sun server enterprice 1000.
1. Hardware configuration
2. Burn program
etc..
Please send me links or dokuments were i can get more infos about this theme.
regards joerg (1 Reply)
Discussion started by: joerg
1 Replies
2. BSD
How shall i burn these files??
cause i dont want to use about 200 MB on 1 cd..
so can i write these three files "bootonly,disk2 & miniinst" into 1 cd?? (4 Replies)
Discussion started by: D-iew
4 Replies
3. OS X (Apple)
without having to write a mini series novel.
i have read the disk utility / help / burn, innuendo solution.
would the correct procedure to burn a Linux Mint Installation DVD/CD onto a USB device be:
1- select the CD/DVD.
2- click burn
3 - in the pop up window that follows choose the USB... (1 Reply)
Discussion started by: cowLips
1 Replies
LEARN ABOUT DEBIAN
lr_environment
LR_ENVIRONMENT.IN(1) LogReport's Lire Documentation LR_ENVIRONMENT.IN(1)
NAME
lr_environment - Export Lire configuration in shell script form
SYNOPSIS
eval `lr_environment`
DESCRIPTION
The lr_environment command is used to import the Lire configuration in Lire shell scripts.
All of Lire configuration variables will be written in a format that can be evaled by the shell.
Shell scripts don't usually have to use that command, since it is done by the defaults file sourced by each command.
The old names used by when the configuration was done in shell script are also exported by this script for backward compatibility.
AUTHOR
Francis J. Lacoste <flacoste@logreport.org>
VERSION
$Id: lr_environment.in,v 1.12 2006/07/23 13:16:33 vanbaal Exp $
COPYRIGHT
Copyright (C) 2003 Stichting LogReport Foundation LogReport@LogReport.org
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.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html.
Lire 2.1.1 2006-07-23 LR_ENVIRONMENT.IN(1)