On Thu, Mar 20, 2014 at 5:58 PM, Chris Watson Christopher.Watson@childrens.harvard.edu wrote:
FYI, you can also get the first file like this:
first_file=$(tar ztf ${in_file} | head -1)
Not to beat this to death, but sometimes this returns a directory name instead of a file name. So `find -type f` is safer, unless there's some way to make tar not do the directory name thing.
-n