I must use tar with -T - and get backed up file list from stdin. Untoftunately when input list is empty, tar creates empty archive. I want prevention to this.
It is possible induce tar to do "Cowardly refusing to create an empty archive" instead creating empty archive with -T - option?
I know, I can examine archive is empty by simply call
tar tvF|head -n 1|grep -c ^ #we are interested in only first file exists or not
then decide remove empty or not.
But I want more elegant solution