configure's tar ustar test can fail on Solaris

Nelson H. F. Beebe beebe at math.utah.edu
Wed Jul 12 14:47:52 CEST 2006


David Shaw comments today:

>> ...
>> The thing is, the 'ustar' string is always at the same byte offset in
>> the file.  I'm wondering if "head -c 262 | tail -c 5" would do it, or
>> some sed or awk magic...
>> ...

Neither sed nor awk can handle binary files; gawk can, but may not be
universally available.

The tool you want is venerable dd: this works back to at least Unix
version V7:

	$ dd skip=257 bs=1 count=5 if=foo.tar 2>/dev/null | grep ustar
	ustar

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe at math.utah.edu  -
- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



More information about the Gnupg-devel mailing list