Jean-Marc Lasgouttes wrote:

>>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> Angus> test $num -ne 0 && which makepsres > /dev/null && { ... (cd
> Angus> xfonts ; rm -f PSres.upr ; makepsres -q) || true
> Angus> }
> 
> Angus> Finally, what's with the '|| true'?
> 
> The idea was to avoid an error if the program makepsres did not exist.
> But it may be that it does not work :)

I thought that maybe the fact that you're using different shell processes 
for the two parts of the expression might be the reason why it doesn't 
work, but that appears not to be the case:

$ makepsres2; echo $?
bash: makepsres2: command not found
127
$ makepsres2 -q || true; echo $?
bash: makepsres2: command not found
0
$ (makepsres2) || true; echo $?
bash: makepsres2: command not found
0

Conclusion: I too don't see why it doesn't work.

Nonetheless, my suggested replacement is less obfuscated (ie, I understand 
it ;-) and saves a few cycles too.

-- 
Angus

Reply via email to