Sponsored Content
Full Discussion: Music cd burn
Top Forums Shell Programming and Scripting Music cd burn Post 302121202 by Shell_Life on Tuesday 12th of June 2007 11:27:39 AM
Old 06-12-2007
Bog,
Since I don't know your application, I could not test this
script -- see if it works for you:
Code:
#!/bin/bash

#Saves the current directory
mSaveDir=`pwd`

#Save the list of "ogg" and "wav" files
mListogg=""
mListmp3=""
for mFileName in $@
do
  j=`echo $mFileName | cut -f2 -d '.'` 
  if test $j = 'ogg' 
  then
    mListogg=${mListogg}" "$mFileName
  fi
  if test $j = 'mp3' 
  then
    mListmp3=${mListmp3}" "$mFileName
  fi
done

#make the "/tmp/cd_temp/" directory
mkdir /tmp/cd_temp

#go at the files directory
cd /tmp/cd_temp

#convert the ogg file in wav file 
for mFileName in ${mListogg}
do
  mBaseName=`basename $mFileName .ogg`
  mFullogg=$mSaveDir"/"$mBaseName".ogg"
  mFilewav=$mBaseName".wav"
  sox $mFullogg $mFilewav
done

#convert the mp3 file in wav file 
for mFileName in ${mListmp3}
do
  mBaseName=`basename $mFileName .mp3`
  mFullmp3=$mSaveDir"/"$mBaseName".mp3"
  mFilewav=$mBaseName".wav"
  mpg123 -w mFilewav ${mFullmp3}
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

burn cdrom with solaris

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 to burn these files...?

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)

burn clarification procedure

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
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)
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy