Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 1996 15:21:22 -0400 (EDT)
From:      hoek@freenet.hamilton.on.ca
To:        reyes01@ibm.net
Cc:        "FreeBSD questions" <questions@FreeBSD.ORG>
Subject:   Re: How to get tar to read input files from file?
Message-ID:  <199608251921.PAA01727@james.freenet.hamilton.on.ca>

next in thread | raw e-mail | index | archive | help
In Email, "Francisco Reyes" <reyes01@ibm.net> wrote:
> I have a book which has a line like
> tar -cvf /dev/fd0 'cat backup.list'>backup.log

If you look carefully at the book, you'll probably see that the
line is actually

tar -cvf /dev/fd0 `cat backup.list` > backup.log

NOTE, the only difference is that I used backtics instead of 
single-quotes to quote "cat backup.list".  Ie ` instead of '.  
To get an idea of what they do, type

echo a b c
echo `ls`
echo *
man echo


> It is supposed to read the file names from a file called backup.list.
> When I try it it dowsn't work. I tried also using <backup.list and
> that didn't work either.

Well, on the FreeBSD system, at least, this is a candidate for Randal 
Shcwartz's (sp!?) useless use of cat award.

You can simply use:

tar -cvf /dev/fd0 -T backup.list > backup.log


> Any suggestions on how to pipe a file to tar to read input files?

No, sorry.  You can use the above stuff, though, to get a very similar 
effect.


-- 
--
tIM...HOEk
The opinions expressed above are mine,
and if my employer shares them, 
that's his hard luck.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608251921.PAA01727>