1 |
On Sun, Jan 4, 2009 at 3:31 PM, Maciej Kazulak <kazulakm@×××××.com> wrote: |
2 |
|
3 |
> The reason only the first command was executed can be that it returned a |
4 |
> non-zero exit status. If you want to make sure every command gets a chance |
5 |
> to execute, regardless of what the exit status of the previous one is, |
6 |
> substitute '&&' with ';'. Check this out: |
7 |
> box% false && echo "will not be echoed" |
8 |
> box% false; echo "hello" |
9 |
> hello |
10 |
> box% |
11 |
> |
12 |
> That's how bash evaluates logic expressions. There's even a fancy word for |
13 |
> it i think. Point is it will execute commands only to the point where it can |
14 |
> determine the logic result. So above if the first element is false there's |
15 |
> no need to execute echo as the logic result is already known to be false. |
16 |
|
17 |
hehe, didn't think about using a ; that would work as well :-) |
18 |
(but if you have A to Z, your command will be much longer than just |
19 |
the for-loop in script 1) |
20 |
|
21 |
BTW, you might want to output all to a file using >> "/home/Fred |
22 |
Music/output.log" and view it using a "tail -f /path/file". Run |
23 |
mp3gain quiet and grep the output.log file for errors/failures.. |