| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 9153.1 | None | RHETT::PARKER |  | Thu Mar 13 1997 09:00 | 6 | 
|  |     
    None - the shell(s) expands all wildcards. What exactly are you trying
    to do? May be able to offer more help if you tell us that...
    
    Lee
    
 | 
| 9153.2 | abc.*, abc*.def | HTSC12::MICKWIDLAM | Water addict, water man | Thu Mar 13 1997 10:19 | 7 | 
|  |     re .1
    
    I would like to extract some files like abc.* or abc*.def. Is there any
    generic way?
    
    Regards,
    Mickwid.
 | 
| 9153.3 |  | VAXCPU::michaud | Jeff Michaud - ObjectBroker | Thu Mar 13 1997 10:44 | 16 | 
|  | > I would like to extract some files like abc.* or abc*.def. Is there any
> generic way?
	You'll have to do a "tar t" to get the list of files in the tar
	file/tape and you can then use grep/egrep with regular expressions
	for what you want. Ex.
		% tar t >list
		% tar x `egrep 'abc\..*|abc.*\.def$' list`
	if the list of files you want to extract is too long that it
	exceeds the max argv size:
		% tar t >list
		% egrep 'abc\..*|abc.*\.def$' list >extlist
		% tar xR extlist
 | 
| 9153.4 | I can't seem to make it work | RHETT::PARKER |  | Thu Mar 13 1997 11:04 | 6 | 
|  |     
    Tha man page sort of implies you can do this, but I can't get it to
    work. Maybe someone else can tell us if there is a way...
    
    Lee
    
 | 
| 9153.5 | Use pax. | QUARRY::reeves | Jon Reeves, UNIX compiler group | Thu Mar 13 1997 16:05 | 1 | 
|  | See man page for details.
 | 
| 9153.6 | find and tar with R option | SEAWLF::COLE | Digital NSIS, Greenbelt, Maryland | Mon Mar 17 1997 09:43 | 11 | 
|  | 
	Or use the find command to generate a list of files
	and use the R option on tar to read this list:
		find . -name "*.doc" -print > mylist
		tar -c -R mylist -f outputfile
	...larry
 | 
| 9153.7 |  | VAXCPU::michaud | Jeff Michaud - ObjectBroker | Mon Mar 17 1997 11:15 | 8 | 
|  | > 	Or use the find command to generate a list of files
> 	and use the R option on tar to read this list:
> 
> 		find . -name "*.doc" -print > mylist
> 		tar -c -R mylist -f outputfile
	reread .0 :-)  the author wants to "extract", not "create"
	a tar archive using wildcards...
 | 
| 9153.8 | silly me ! | PRMS00::COLE |  | Tue Mar 18 1997 09:21 | 2 | 
|  |     Silly me !
    
 | 
| 9153.9 | does work, escape wildcards! | TUXEDO::CHUBB |  | Wed Mar 19 1997 15:30 | 45 | 
|  |     This will work fine.  You just must escape the wildcards on the
    extraction.  Also be aware that if you create the tar file using . (or
    some other directory) the filenames within won't be simple.
    
    Example:
    % cat | tee 1file 2file 3file > foo      # just to make several files
    Just testing.  
    % ls
    1file   2file   3file   foo
    % cat ?file
    Just testing.
    Just testing.
    Just testing.
    % wc -l !$ 
             1 1file
             1 2file
             1 3file
             3 total
    % cat foo
    Just testing.
    % tar cvf ../test.tar *
    a 1file 1 Blocks
    a 2file 1 Blocks
    a 3file 1 Blocks
    a foo 1 Blocks
    % ls
    1file   2file   3file   foo
    % rm *
    % tar tvf ../test.tar
    blocksize: 20
    -rw-rw-r--  1288/0       14 Mar 19 15:23:02 1997 1file
    -rw-rw-r--  1288/0       14 Mar 19 15:23:02 1997 2file
    -rw-rw-r--  1288/0       14 Mar 19 15:23:02 1997 3file
    -rw-rw-r--  1288/0       14 Mar 19 15:23:02 1997 foo
    % tar xvf ../test.tar \?file
    blocksize: 20
    x 1file, 14 bytes, 1 tape blocks
    x 2file, 14 bytes, 1 tape blocks
    x 3file, 14 bytes, 1 tape blocks
    % 
    
    Notice that 'foo' wasn't extracted.
    
    -- brandon
                                                                         
 |