Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-amd64
2009/1/4 Paul Stear <span dir="ltr"><<a href="mailto:gentoo@...">gentoo@...</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Sunday 04 January 2009 12:33:27 Martin Herrman wrote:<br>
> On Sun, Jan 4, 2009 at 1:30 PM, Paul Stear <<a href="mailto:gentoo@...">gentoo@...</a>> wrote:<br>
> > Hello all,<br>
> > I have the following command which works well..<br>
> > mp3gain --auto /home/"Fred Music"/mp3/B*/*.mp3<br>
> ><br>
> > I want to expand this so overnight I can get more directories completed.<br>
> > I tried the following but it only did the directories starting "B", the<br>
> > sequence after the && just wasn't actioned. I have looked at bash docs<br>
> > but can't find anything relevent (probably staring me in the face).<br>
> > mp3gain --auto /home/"Fred Music"/mp3/B*/*.mp3 && mp3gain --auto<br>
> > /home/"Fred Music"/mp3/C*/*.mp3 && mp3gain --auto /home/"Fred<br>
> > Music"/mp3/D*/*.mp3<br>
> ><br>
> > Any ideas?<br>
> > Paul<br>
><br>
> Hi Paul,<br>
><br>
> I have created some shell scripts that execute some operations on my<br>
> ogg/mp3 file collection. I use 'find' to create a list of all my files<br>
> and next process them. Ogg2mp3 also uses all of your cores. You might<br>
> use these scripts and adapt them to your needs:<br>
><br>
> <a href="http://www.herrman.nl/index.php?item=ogg2mp3tagfiles" target="_blank">http://www.herrman.nl/index.php?item=ogg2mp3tagfiles</a><br>
><br>
> HTH,<br>
><br>
> Martin<br>
<br>
</div></div>Thanks for your reply Martin. I have looked at your scripts and I might be<br>
able to use then in the future. My main problem is that my collection is so<br>
large, e.g 3104 files just in the directory beginning with "D" and that take<br>
about 4+ hours to run. So I could do with operating on 3 directories<br>
overnight.<br>
I must be able to add commands to be operated on in sequence.<br>
<div><div></div><div class="Wj3C7c"><br>
Any ideas?<br>
<br>
Paul<br>
<br>
--<br>
This message has been sent using kmail with gentoo linux<br>
</div></div></blockquote><div><br></div></div><br>The reason only the first command was executed can be that it returned a non-zero exit status. If you want to make sure every command gets a chance to execute, regardless of what the exit status of the previous one is, substitute '&&' with ';'. Check this out:<br>
box% false && echo "will not be echoed"<br>box% false; echo "hello"<br>hello<br>box%<br><br>That's how bash evaluates logic expressions. There's even a fancy word for it i think. Point is it will execute commands only to the point where it can determine the logic result. So above if the first element is false there's no need to execute echo as the logic result is already known to be false.<br>
|
|