🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #150

Bug/feature of the '-T -' option of gtar

#150
From: Michael I Bushnell
Date: Wed, 15 Apr 1992 05:20
29 lines
1693 bytes
   Resent-Date: 14 Apr 92 15:55:34 GMT
   Original-To: gnu-utils-bug@prep.ai.mit.edu
   Path: cam!cam.nist.gov!crosson
   From: crosson@cam.nist.gov (Robert Crosson)
   Sender: gnulists@ai.mit.edu
   Newsgroups: gnu.utils.bug
   Date: 14 Apr 92 15:55:34 GMT
   Resent-From: bug-gnu-utils-request@prep.ai.mit.edu

   I have discovered that the -T option of Gnu tar version 1.10 may
   have a bug in it.  I created a script that piped file names to tar
   which was invoked with the option '-T -'.  In testing the script,
   I found that when tar was invoked with that option, but no file names
   were sent before the pipe closed, tar used the current directory as 
   the place to select files from for archiving.

   The script line including tar was essentially as follows:

   find <findoptions> | sed -f <sed-script-file> | tar -cvf - -T - > <filename>

   I would have thought that, given the '-T -' option but no file names,
   tar would have simply exited without doing anything.  Is this a feature
   or a bug?

This is a side effect of the general rule that tar does the current
directory when there is no list of names.  The names read from -T are
treated exactly like those read from the command line.

	-mi
Technical Details
Message-ID: <9204151320.AA14521@geech.gnu.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!mib
References: <9673@fs3.cam.nist.gov>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!mib
From: mib@gnu.ai.mit.edu (Michael I Bushnell)
Subject: Bug/feature of the '-T -' option of gtar
Message-ID: <9204151320.AA14521@geech.gnu.ai.mit.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
References: <9673@fs3.cam.nist.gov>
Distribution: gnu
Date: Wed, 15 Apr 1992 05:20:05 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 30