I do not personally contribute code to gtar but I do maintain another tar implementation called "bsdtar".
Handling filenames with spaces is a common problem and I've long been interested in finding a better solution than the ones currently used by both gtar and bsdtar. Supporting $IFS is something I'll definitely think about. I've also considered ways to automatically detect situations like yours by having tar try splitting both with and without spaces. I think that's feasible, but I haven't had time to try implementing it. Tim On Jan 26, 2011, at 8:36 AM, Terry Moore wrote: > No. I do not have a Solaris 10 document anywhere that supports it. I found > the trick long ago in "Unix Shell Programming", by Setphen G. Kochan and > Patrick H. Wood, page 266 (Copyright 1985). I have been using it for the > last four years in this cleanup. You can type: > echo "$IFS" | od -b > To see it. I found it on Solaris 10 and it works. But not with gtar. > As a matter of fact, I went ahead and used the original tar command back in > place and it worked perfectly last night. I retried the command with the > --no-unquote argument this morning, and it did not work. > I appreciate the FABULOUS work you and others have done to create a GREAT > product like gtar. I wish I had the knowledge to help, but I am a scripter, > not a programmer. The book I reference was my very first Unix tome and I > used it to learn on a AT&T B100, long, long ago. > Thank You, Tim! > Terry > > -----Original Message----- > From: Tim Kientzle [mailto:[email protected]] > Sent: Wednesday, January 26, 2011 9:13 AM > To: Terry Moore > Cc: [email protected] > Subject: Re: [Bug-tar] Filenames with spaces not handled properly > > On Jan 25, 2011, at 5:57 PM, Terry Moore wrote: >> I routinely clean up old files after a time. Some of these files have >> spaces in the file name. I have a Solaris 10 server. With tar, I used to >> have my ksh script capture and change the IFS ksh variable. I save it to >> OIFS, set it to just a newline character, and then do the tar using an >> include file containing the list of files I want to put on the tape. When >> the tar is done, I put the IFS back the way it was from OIFS. >> This has worked quite well in the past,... > > Is this behavior of Solaris 10 tar documented somewhere? > > I looked at the online Solaris 10 documentation, but can't > find any reference to IFS being obeyed by Solaris 10 tar: > > http://download.oracle.com/docs/cd/E19253-01/816-5165/6mbb0m9td/index.html > > Tim > > >
