Mailinglist Archive: opensuse (1599 mails)

< Previous Next >
Re: [opensuse] Bash Guru help needed, recursively extract rarred files
  • From: Anders Johansson <ajohansson@xxxxxxx>
  • Date: Tue, 13 Oct 2009 00:24:34 +0200
  • Message-id: <200910130024.34942.ajohansson@xxxxxxx>
On Tuesday 13 October 2009 00:00:44 David Haller wrote:
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, it said what he
wanted, which was to use r01 instead of rar in case .rar didn't exist

Why the 'test'?

readability

And 'x' is the wrong command (fullpath, you want
current dir, it might make no difference here though, that depends on
how the rar was packed).

good point

I'm not that sure on what conditions rar exits with a status != 0

on errors. It exits with 0 when everything went OK

Anders
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >