Re: How to create a tar + gzip from a listing of file names.
- From: Stephane CHAZELAS <this.address@xxxxxxxxxx>
- Date: Thu, 25 Jan 2007 21:43:33 GMT
2007-01-25, 18:56(+08), Bo Yang:
[...]
Does the following code works for you ?
tar cvf BKUPTST_$DATE.tar $(sed 's/\n/ /g' < archive.lst)
$(....) splits upon space, tabs and newlines by default and also
expands the wildcards. So you don't need to convert newlines to
spaces. You should rather make sure $(...) only splits on
newlines, and doesn't expand the wildcards:
IFS='
'
set -f
--
Stéphane
.
- References:
- How to create a tar + gzip from a listing of file names.
- From: Daryl Rose
- How to create a tar + gzip from a listing of file names.
- Prev by Date: Re: copying files from shell to network drive
- Next by Date: Active FTP PORT command - port number
- Previous by thread: Re: How to create a tar + gzip from a listing of file names.
- Next by thread: copying files from shell to network drive
- Index(es):
Relevant Pages
|