"dd bs=2 conv=swab" == "cat" in 4.1bsd and sys3 (at least)

P. T. Withington ptw at vaxine.UUCP
Fri Aug 12 01:35:35 AEST 1983


Setting a buffer size of two causes dd(1) to ignore the swab conversion.  The
problem is due to line 332(4.1) 338(sys3):

		c = (ibc>>1) & ~1;

it should read:

		c = (ibc>>1);

I believe the coder couldn't make up their mind whether to round down and
count bytes, or to div and count words, so did both.  (Am I right?  Did I
win?)

Unless this is an undocumented feature...

			     't`   --Tucker (ptw at vaxine.UUCP)
			      ~



More information about the Net.bugs.usg mailing list