On 10/03/2013 05:12 PM, vic...@vsespb.ru wrote:

>>
> I described use-case when user needs to *throw an error* when backup is 
> impossible.

If test -e fails, backup is impossible.  Throw an error in that case.

> 
> That's important to know that backup failed in this use-case.

I don't see the distinction.  Either you have access to a file to
attempt to back it up, or you don't.  It doesn't matter why you don't.
If you don't have access, then you cannot tell whether the file exists
or not.  So you might as well assume it does not exist, and write your
script to error out if a user feeds you a name that you cannot access.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to