andrew@frip.gwd.tek.com (Andrew Klossner) (06/22/88)
>> Can't you just do: "dd conv=unblock cbs=80 (or whatever)" to >> convert the file to standard Unix \n-terminated lines? Hasn't this been >> part of Unix since at least v6? > Apparently not: neither System III nor System V r3.1 supports it. (I used > "strings" on both systems, to make sure it wasn't merely undocumented). Either your "strings" is busted or you have a crippled V3.1. The vanilla AT&T 3.1 source tape includes a dd.c that implements this command. -=- Andrew Klossner (decvax!tektronix!tekecs!andrew) [UUCP] (andrew%tekecs.tek.com@relay.cs.net) [ARPA]
allbery@ncoast.UUCP (Brandon S. Allbery) (07/02/88)
As quoted from <10104@tekecs.TEK.COM> by andrew@frip.gwd.tek.com (Andrew Klossner): +--------------- | >> Can't you just do: "dd conv=unblock cbs=80 (or whatever)" to | | > Apparently not: neither System III nor System V r3.1 supports it. (I used | > "strings" on both systems, to make sure it wasn't merely undocumented). | | Either your "strings" is busted or you have a crippled V3.1. The +--------------- My eyeballs must be broken. I checked again and the option is listed. But it isn't in our manual, and it isn't on System III. -- Brandon S. Allbery, uunet!marque!ncoast!allbery DELPHI: ALLBERY For comp.sources.misc send mail to ncoast!sources-misc
ggs@ulysses.homer.nj.att.com (Griff Smith) (07/06/88)
In article <10104@tekecs.TEK.COM>, andrew@frip.UUCP writes: | >> Can't you just do: "dd conv=unblock cbs=80 (or whatever)" to | >> convert the file to standard Unix \n-terminated lines? Hasn't this been | >> part of Unix since at least v6? | | > Apparently not: neither System III nor System V r3.1 supports it. (I used | > "strings" on both systems, to make sure it wasn't merely undocumented). | | Either your "strings" is busted or you have a crippled V3.1. The | vanilla AT&T 3.1 source tape includes a dd.c that implements this | command. | | -=- Andrew Klossner (decvax!tektronix!tekecs!andrew) [UUCP] | (andrew%tekecs.tek.com@relay.cs.net) [ARPA] Be nice to the poor fellow; "conv=unblock" was a BSD feature not supported by AT&T versions of dd other than V[89]. As of SVr3 dd has all the BSD features, but someone neglected to notify the documentation department. It might help if some of the real customers would submit problem reports complaining that the documentation is broken. -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: 1-201-582-7736 UUCP: {allegra|ihnp4}!ulysses!ggs Internet: ggs@ulysses.att.com
mac@esl.UUCP (Mike McNamara) (07/23/88)
People have noted that HP-UX does not document the block/unblock conversion options in dd. Our system (CYDROME) is also a system V R3 derivitive, and since I was educated :-) on berkeley systems, I would always just type out dd if=/dev/rmt0 ibs=64k cbs=80 conv=unblock to read blocked tapes, until one day a guy complained that he couldn't read such a tape, cause there where no newlines. I told him, "use dd; type <the above>; its in the man page." It isn't in any ATT man page. /bin/dd never read the man page, and fully supports the undocumented cbs and conv=unblock/block options. So many companies license Unix from AT&T or berkeley, and just run the man pages through sed -e 's/AT&T/Tadpole Computer/' , and ship it. (It can be quite humerous to see man pages talking about "The -6 switch allows tar to read Tadpole Computer Version 6 tapes" :-) I guess the only trustworthy documentation is in the source :-) -mac -- Michael Mc Namara Cydrome Incorporated ARPA: esl!cydrome!mac@ames.arpa
ggs@ulysses.homer.nj.att.com (Griff Smith) (07/31/88)
In article <736@esl.UUCP>, mac@esl.UUCP writes: ... > dd if=/dev/rmt0 ibs=64k cbs=80 conv=unblock ... > ... isn't in any ATT man page. > > /bin/dd never read the man page, and fully supports the undocumented > cbs and conv=unblock/block options. > > -- > Michael Mc Namara > Cydrome Incorporated > ARPA: esl!cydrome!mac@ames.arpa Not quite true. I have a fine version of the manual page on my system at AT&T. It's the same one I sent to Summit a few years ago, along with the SVr3 re-write of dd. That was the end of a long story that started about 1984 when I looked at the source code for dd and realized that the EBCDIC -> ASCII conversion option was painfully inefficient, which caused some of our production tape jobs to take hours of CPU time. Over a weekend, I wrote most of the code for a version that was 5 to 10 times faster than the one they distributed. After proving my point to my supervisor, I finished the job (I also neglected to re-implement 9 bugs in the process). Then I tried to contribute it to the Unix System development people. I was formally ignored, and informally told that dd was such an unimportant program that it wasn't worth the resources required to do new design specifications, code reviews, etc. A few years later, some winds of change finally blew through Summit and my re-write was quietly substituted for the broken version in the 3.0 release. A few months later, I looked at the shiney new System V manuals for the revised documentation and was concerned to see that the BSD features that I had added were not mentioned. A check of the code confirmed that my code had not been changed, but I realized that I had a new problem; if I reported the inconsistency between the code and the documentation the support people would have two choices: 1) update the documentation 2) strip the new features to make the code match the documentation After two years of aggravation, I didn't have the strength to go through it again. I decided to wait until lots of people had discovered the new features, which would make option (2) a public relations disaster. I think it's safe to send them the manual pages now. Sorry to be so devious, but this place was really strange a few years ago. My thanks to the people at Summit (especially to the ToolChest maintainers) who passed me suggestions for doing end-runs around the bureaucracy. -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: 1-201-582-7736 UUCP: {allegra|ihnp4}!ulysses!ggs Internet: ggs@ulysses.att.com
paul@csnz.nz (Paul Gillingwater) (08/01/88)
In article <10479@ulysses.homer.nj.att.com> ggs@ulysses.homer.nj.att.com (Griff Smith) writes: >In article <736@esl.UUCP>, mac@esl.UUCP writes: >... >> dd if=/dev/rmt0 ibs=64k cbs=80 conv=unblock ... >> ... isn't in any ATT man page. >> >> /bin/dd never read the man page, and fully supports the undocumented >> cbs and conv=unblock/block options. >> >Not quite true. I have a fine version of the manual page on my system >at AT&T. It's the same one I sent to Summit a few years ago, along >with the SVr3 re-write of dd. So why not post the man page for dd already? Some of us at the end of the UNIX pipe(line) would appreciate it - New Zealand isn't exactly geographically close to Murray Hill, and Olivetti (the vendor who sold us our 3B2) have several month's of hysteresis on such fixes.... >Sorry to be so devious, but this place was really strange a few >years ago. I really liked your description of bypassing the system... it reminds me of a book called "The Dream of Ravan", (anon.), which was published by Dublin University's magazine last century. It is based very loosely on the Hindu epic that rivals the Iliad, the Ramayana. The bit I liked was about some spells called "astras" - it listed a whole load of different ones, e.g. various magical weapons, curses, blights, plagues etc. But the one that cast the most fear into the enemy was translated as "the noose of law" - the one that involves you in delays, bureaucratese, litigation, lawsuits etc. A terrible curse indeed! >Griff Smith AT&T (Bell Laboratories), Murray Hill Thanks Griff. Hope you enjoyed my little digression! -- Paul Gillingwater, Computer Sciences Call this BBS - Magic Tower (24 hours) paul@csnz.nz (vuwcomp!dsiramd!csnz) NZ +64 4 753 561 8N1 TowerNet software P.O.Box 929, Wellington, NEW ZEALAND V21/V23/V22/V22bis/Bell 103/Bell 212A Vox: +64 4 846194, Fax: +64 4 843924 "All things must parse"-ancient proverb
ggs@ulysses.homer.nj.att.com (Griff Smith) (08/03/88)
In article <48@csnz.nz>, paul@csnz.UUCP writes: > In article <10479@ulysses.homer.nj.att.com> ggs@ulysses.homer.nj.att.com (Griff Smith) writes: > >In article <736@esl.UUCP>, mac@esl.UUCP writes: > >... > >> dd if=/dev/rmt0 ibs=64k cbs=80 conv=unblock ... > >> ... isn't in any ATT man page. > >> > >> /bin/dd never read the man page, and fully supports the undocumented > >> cbs and conv=unblock/block options. > >> > >Not quite true. I have a fine version of the manual page on my system > >at AT&T. It's the same one I sent to Summit a few years ago, along > >with the SVr3 re-write of dd. > > So why not post the man page for dd already? Some of us at the end of > the UNIX pipe(line) would appreciate it - New Zealand isn't exactly > geographically close to Murray Hill, and Olivetti (the vendor who sold > us our 3B2) have several month's of hysteresis on such fixes.... Given that the on-line manual pages are a value-added product and not part of the standard distribution (I'm not sure about this, but recent netnews articles lead me to believe it), I suspect that the proprietary police might frown on my posting the full man page (you should see the propaganda we get around here). The following is a brief summary of all implemented features: if=file input file name; standard input is default of=file output file name; standard output is default ibs=n input block size (bytes, default 512) obs=n output block size (bytes, default 512) bs=n set both input and output block size, superseding ibs and obs cbs=n conversion buffer size (logical record length) files=n copy and concatenate input files skip=n skip n input records before starting copy iseek=n seek n records from beginning of input file before copying (fast skip for disk files) oseek=n seek n records from beginning of output file before copying seek=n identical to "oseek", retained for backward compatibility count=n copy only n input records conv=ascii convert EBCDIC to ASCII conv=ebcdic convert ASCII to EBCDIC conv=ibm slightly different map of ASCII to EBCDIC conv=block convert newline-terminated ASCII to blocked ASCII conv=unblock convert blocked ASCII to newline-terminated ASCII conv=lcase map alphabetics to lower case conv=ucase map alphabetics to upper case conv=swab swap every pair of bytes conv=noerror do not stop processing on an error (limit of 5 consecutive errors) conv=sync pad every input record to ibs > Paul Gillingwater, Computer Sciences Call this BBS - Magic Tower (24 hours) > paul@csnz.nz (vuwcomp!dsiramd!csnz) NZ +64 4 753 561 8N1 TowerNet software > P.O.Box 929, Wellington, NEW ZEALAND V21/V23/V22/V22bis/Bell 103/Bell 212A > Vox: +64 4 846194, Fax: +64 4 843924 "All things must parse"-ancient proverb All the way to the antipodes and back in less than three days - not bad! -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: 1-201-582-7736 UUCP: {allegra|ihnp4}!ulysses!ggs Internet: ggs@ulysses.att.com