I'm running a command from a script liketar -c -f ar.tar a b c dwhere b, c, and d may not exist, and may be directories. The solutions that I've come up with are piping the output of ls -d to grep, then splicing it into the tar command, or turning on extended globs for @(a|b|c|d).Is there a neater way of doing this? I'm on Debian Wheezy, which doesn't seem to have an --include parameter.
Tar a list of files which don't all exist
shell;wildcards;tar
you can try tar cf ar.tar $(ls a b c d )wherec for createf ar.tar specify tar file$(ls a b c d) will list to stdin which file are realy present (and give error for other)