Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 28 Dec 2015 07:05:49 -0600 Newsgroups: alt.os.linux.slackware,comp.os.linux.misc,alt.os.linux.debian Subject: Re: grep in non linux EOL? References: From: floyd@apaflo.com (Floyd L. Davidson) Organization: __________ Date: Mon, 28 Dec 2015 04:05:38 -0900 Message-ID: <871ta6wwnx.fld@barrow.com> User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.19 Cancel-Lock: sha1:d8GEV9LVsBXkYzWCwb5Z57Rneao= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 78 X-Trace: sv3-6TuM9orv8yg+hCORB/XpGM9QO1NiPjgfrDlYw61XmVzVvu5LB4n9uVk8g+sNqOtSBGl1Vz7frgsDd+4!3Ni8Skp0sZ7CAMMDLrY7+GRl+7G3kRSaPQY1t/gnRJWwmGJSiK/kqlfBqTHe8Q== X-Complaints-To: www.supernews.com/docs/abuse.html X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4324 X-Received-Bytes: 4436 X-Received-Body-CRC: 3851753370 Xref: csiph.com alt.os.linux.slackware:26030 comp.os.linux.misc:16640 alt.os.linux.debian:7555 The Natural Philosopher wrote: >On 28/12/15 09:47, Doug Laidlaw wrote: >> no.top.post@gmail.com Wrote in message: >>> It's OK if you want to donate your much-better-version. >>> But what I really need to know is the REASONING BEHIND >>> why my version fails. >>> >>> With dir-trees having mixed-format text-files: 3 types: >>> *nix, DOS, EOL=x0d, I need to find files containing a string: $1 >>> Testing LEOfind:- >>> #!/bin/bash >>> find /sa5/Legal/CIPC -exec grep "$1" {} \; 2>/dev/null | fold | grep $1 >>> with ./LEOfind Gates , gives me also some lines which do NOT contain >>> "Gates". >>> Surely ` | grep Gates` >>> must consist of lines, each containing "Gates" >>> >>> ==TIA. >>> >>> >> >> Your "grep Gates" may be looking at one big long line that >> displays word- >> wrapped, but really isn't. >> >> The concepts involved do puzzle me, but I can use them. >> >> What does a typewriter do? It goes to the next line (that is ) >> and the carriage goes back (that is ). Those two codes >> are used together only in Windows. In Linux and the >> Mac, only one marks the end-of-line, but both happen. >> >It all harks back to the days of teletypes and mecahnical printers. > >By the time UNIX was developed, CRT displays and monitors were common place. In 1969??? Not at all. UNIX was developed using teletype machines printing on paper for IO. And incidentally, UNIX did not invent the idea of using a single character for a newline, the Teletype Corporation did! This URL has a picture of Ken Thompson and Dennis Ritchie working with UNIX on a PDP-11 at Bell Labs. https://en.wikipedia.org/wiki/Ken_Thompson#/media/File:Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg >DOS owes its heritage to CP/M and that harks back in >turn to I think an INTEL operating system used on their >8080 development platform CP/M was developed on Intel hardware, and the reason for developing it was a total lack of any kind of an OS. Gary Kildall came up with CP/M in 1973. He offered it to Intel, but they were not interested because they were working on an OS of their own. Note that there is a significant distinction in what UNIX and CP/M were intended for. UNIX was a research project to develop a multi-user fully functional OS on a "small" *computer* the size of several racks of equipment. CP/M was meant to provide the absolute bare minimum of management for a single user working with a *device* *controller* to simulate some functions of a "real" computer. It all sat on a desktop, and the true marvel was that an 8080 device controller could do anything useful at all! Intel did not see their device controllers as "micro computers". A group of engineers broke off and formed Zilog to do just that. Intel continued to produce device controllers right up to the 80186. The 80286 was the first nod to a computer, and the 80386 was their first "real" computer chip. -- Floyd L. Davidson http://www.apaflo.com/ Ukpeagvik (Barrow, Alaska) floyd@apaflo.com