trying to convert batch files to shell scripts, wanting to use linux version of lame |
![]() ![]() |
trying to convert batch files to shell scripts, wanting to use linux version of lame |
Apr 13 2005, 15:51
Post
#1
|
|
|
Group: Members Posts: 7 Joined: 12-April 05 Member No.: 21404 |
here is what i am trying to do
convert wavs to mp3s i just need some help in converting dos batch files to linux shell scripts here is a link to give you more info http://www.linuxforums.org/forum/topic-39733.html This post has been edited by kaibab: Apr 13 2005, 15:53 |
|
|
|
Apr 13 2005, 15:57
Post
#2
|
|
![]() Server Admin Group: Admin Posts: 4808 Joined: 24-September 01 Member No.: 13 |
The problem is probably that you need to mark the scripts as executable on linux.
For example chmod u+x myscriptname.sh |
|
|
|
Apr 13 2005, 15:59
Post
#3
|
|
|
Group: Members Posts: 7 Joined: 12-April 05 Member No.: 21404 |
i am kinda new to doing shell scripting
This post has been edited by kaibab: Apr 13 2005, 16:00 |
|
|
|
Apr 13 2005, 16:59
Post
#4
|
|
|
Group: Members Posts: 761 Joined: 29-September 01 Member No.: 40 |
OT:
may I ask why you use -b 192 and -B 320 when using -V4 ? -mj is also the default. Seems odd. If you use bash, you need something like: CODE list=`ls ~/path-to-your-waves`
for files in $list do if [[ -f $files && ${files: -3} == "wav" ]]; then lame -V4 $files fi done This post has been edited by Benjamin Lebsanft: Apr 13 2005, 17:02 |
|
|
|
Apr 13 2005, 18:02
Post
#5
|
|
![]() Group: Members Posts: 1394 Joined: 20-December 01 From: seattle Member No.: 693 |
just write a for/do script to encode.
CODE #!/bin/sh for file in *wav do lame --alt-preset standard "$file" done CODE #!/bin/sh
for dir in * do cd "$dir" ~/bin/myfuzzylamescript.sh cd .. done -------------------- RareWares/Debian :: http://www.rarewares.org/debian.html
|
|
|
|
Apr 14 2005, 21:45
Post
#6
|
|
|
Group: Members Posts: 7 Joined: 12-April 05 Member No.: 21404 |
i have tried the scripts in the way that my batch files were written: bash -x scriptname.sh
it said it couldn't find the files how do split the commands so you can use only one shell script file? do i need to add #!/bin/bash before each lame command? |
|
|
|
Apr 14 2005, 21:46
Post
#7
|
|
|
Group: Members Posts: 7 Joined: 12-April 05 Member No.: 21404 |
i have tried the scripts in the way that my batch files were written: bash -x scriptname.sh
it said it couldn't find the files how do split the commands so you can use only one shell script file? do i need to add #!/bin/bash before each lame command? |
|
|
|
Apr 14 2005, 21:47
Post
#8
|
|
|
Group: Members Posts: 7 Joined: 12-April 05 Member No.: 21404 |
i have tried the scripts in the way that my batch files were written: bash -x scriptname.sh
it said it couldn't find the files how do split the commands so you can use only one shell script file? do i need to add #!/bin/bash before each lame command? |
|
|
|
Apr 14 2005, 21:48
Post
#9
|
|
|
Group: Members Posts: 7 Joined: 12-April 05 Member No.: 21404 |
i have tried the scripts in the way that my batch files were written: bash -x scriptname.sh
it said it couldn't find the files how do split the commands so you can use only one shell script file? do i need to add #!/bin/bash before each lame command? |
|
|
|
Apr 15 2005, 00:12
Post
#10
|
|
![]() Group: Members Posts: 1394 Joined: 20-December 01 From: seattle Member No.: 693 |
whoa there... settle down
try $ sh scriptname.sh -------------------- RareWares/Debian :: http://www.rarewares.org/debian.html
|
|
|
|
Apr 15 2005, 01:56
Post
#11
|
|
|
Group: Members Posts: 7 Joined: 12-April 05 Member No.: 21404 |
QUOTE (xmixahlx @ Apr 14 2005, 05:12 PM) whoa there... settle down sorry about the triple posting the stupid browser wouldn't load the next page this morning the connection showed that it wasn't loading anything This post has been edited by kaibab: Apr 15 2005, 01:57 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 25th May 2013 - 09:33 |