Hello, On Tue, 13 Oct 2009, Anders Johansson wrote:
On Tuesday 13 October 2009 00:00:44 David Haller wrote:
And 'rar' is more robust, so one should prefer that over 'unrar' if rar is installed (which I assume).
rar is not included in the distribution. It is only available through packman, and it looks like it is closed source, and you're only allowed to use it for 40 days without acquiring a license. I don't think you should be recommending it
I am (ATM) not sure where I got my RAR 3.00 beta 3 Copyright (c) 1993-2002 Eugene Roshal 21 Feb 2002 Shareware version Type RAR -? for help from, don't want to boot the new box to look what I got there (something newer) for this, I'll look tomorrow, but it _is_ more robust (e.g. with password-protected files, IIRC) than 'unrar'. I was just saying that _IFF_ you use that rar anyway, it might save you some grief to use it for extraction as well. RAR has a wierd licensing, anyway, IIRC. [..]
if ! test -e $rarfile; then echo "cannot find rarfile in $clientdir" >&2 continue; ### or exit? Depends what you want fi
Yes David, and if you read the email I was responding to,
Of COURSE I have! I always do.
it said what he wanted, which was to use r01 instead of rar in case .rar didn't exist
What about neither .rar nor .r01 existing? But e.g. an .r00 or none at all??? How do you handle that? That's what my block o' code does. Find a more elaborate version in my other mail.
Why the 'test'? readability
Oh, that was just about the or command command test $? -eq 0 && command2 [ $? -eq 0 ] && command2 versus the "simpler" command && command2 or if command; then command2; fi which is _exactly_ the same in effect ... Just one of my pet-peeves[0] ;) If one of the above is better readable than the 'c1 && c2', you should (generally speaking from experience) be using a nicely formatted 'if command; then .. fi' anyway. It is quite uncommon to need to check for specific exit-codes other that 0 or !0. Rule of thumb: Any use of $? except in case $? in ... esac OR retval=$? do_something_with $retval do_more_with_retval [..] is (usually) quite superfluous. -dnh [0] got quite a collection of those :) -- Ah, the beauty of OSS. Hundreds of volunteers worldwide volunteering their time inventing and implementing new, exciting ways for software to suck. -- Toni Lassila -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org