Path: utzoo!attcan!uunet!husc6!necntc!drilex!axiom!insyte!jad From: jad@insyte.UUCP (Jill Diewald) Newsgroups: comp.unix.wizards Subject: Re: "dd conv=unblock cbs=80 - really grep replacement" Keywords: grep replacement Message-ID: <145@insyte.UUCP> Date: 29 Jun 88 17:50:35 GMT References: <144@insyte.UUCP> <3350@phri.UUCP> <8168@ncoast.UUCP> <10104@tekecs.TEK.COM> Reply-To: jad@insyte.UUCP (Jill Diewald) Organization: Innovative Systems Techniques (INSYTE), Newton, MA Lines: 36 In article <10104@tekecs.TEK.COM> andrew@frip.gwd.tek.com (Andrew Klossner) 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. This is a reply to my original request for a way to use grep on files with very long fixed record lengths. Two things: first I am using HP-UX which does not have 'conv=block' documented so its probably not implemented either. More importantly, this is NOT a good solution. (I could easily write a c program to reformat the file if I wanted to.) The files that we deal with are very very large data files. Making a reformated copy of the file is not a good solution. I could just as easily (in fact this is what I usually do) execute emacs, go to lunch while it loads, and then use emacs to do the searches - which is easier than grep anyway. Making a reformated copy 1) uses up too much disk space, and 2) takes too long. Ideally, grep could be passed a record size which it would use instead of newlines. And/Or grep could be told to only search specified columns of every record. This would enable me to easily deal with these files without tieing up either memory or disk space. Jill Diewald Innovative Systems Newton, Ma ... harvard!axiom!insyte!jad