Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #16635
| From | Doug Laidlaw <laidlaws@hotkey.net.au> |
|---|---|
| Newsgroups | alt.os.linux.slackware, comp.os.linux.misc, alt.os.linux.debian |
| Subject | Re:grep in non linux EOL? |
| Date | 2015-12-28 20:31 +1100 |
| Organization | news.aioe.org |
| Message-ID | <n5qvgp$fjd$1@speranza.aioe.org> (permalink) |
| References | <n5n68j$ft6$1@dont-email.me> |
Cross-posted to 3 groups.
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 `<any command> | grep Gates`
> must consist of lines, each containing "Gates"
>
> ==TIA.
>
>
I would put it this way, but I could be wrong:
grep looks line by line. To define a line, it looks for a Linux EOL.
If it finds the EOL from a different OS, it ignores that and keeps
going. I have had bad EOF messages because the last
character in the file was not an EOL.
Doug.
--
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
grep in non linux EOL? no.top.post@gmail.com - 2015-12-26 23:01 +0000
Re: grep in non linux EOL? Rich <rich@example.invalid> - 2015-12-27 05:19 +0000
Re: grep in non linux EOL? no.top.post@gmail.com - 2015-12-29 20:05 +0000
Re: grep in non linux EOL? no.top.post@gmail.com - 2015-12-30 02:05 +0000
Re:grep in non linux EOL? Doug Laidlaw <laidlaws@hotkey.net.au> - 2015-12-28 20:31 +1100
Re:grep in non linux EOL? Doug Laidlaw <laidlaws@hotkey.net.au> - 2015-12-28 20:47 +1100
Re: grep in non linux EOL? The Natural Philosopher <tnp@invalid.invalid> - 2015-12-28 10:18 +0000
Re: grep in non linux EOL? floyd@apaflo.com (Floyd L. Davidson) - 2015-12-28 04:05 -0900
csiph-web