[Nottingham] Help... How to grep four words in a file appearing in any permutation?
Martin
martin at ml1.co.uk
Mon Nov 23 16:03:01 UTC 2015
Just need the file names for files that have those four words.
There should be a surrounding 'white space' or end/start of line.
And the words can appear in any order in the file...
The words may well be on two adjacent lines, hence why the chain of
greps isn't the full answer...
?
Cheers,
Martin
Richard Parsons wrote:
> The four words have to be next to each other separated by spaces?
>
> Do you want the grep to flag the matching file, or is the specific line
> important?
>
> On Mon, Nov 23, 2015 at 3:33 PM, Martin <martin at ml1.co.uk
> <mailto:martin at ml1.co.uk>> wrote:
>
> Folks,
>
> One of those clever one-liners please?
>
>
> How to grep for four words in a file that can appear in any permutation?
>
> ?
>
> Cheers,
> Martin
>
>
> --
> - ╔═══════════════════╦══════════════════════════════════════════╗
> - ║ Martin Lomas ║ OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7 ║
> - ║ martin@ ml1 co uk ║ Import from hkp://subkeys.pgp.net
> <http://subkeys.pgp.net> or ║
> - ║ ----------------- ║ http:// ml1 .co .uk/martin_ml1_co_uk.gpg ║
> - ╚═══════════════════╩══════════════════════════════════════════╝
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk <mailto:Nottingham at mailman.lug.org.uk>
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
>
>
>
>
> --
> Redwood Legal
> rp at redwoodlegal.co.uk <mailto:rp at redwoodlegal.co.uk>
> Office: 02030 956010
> Mobile: 07544 822706
> 138-140 Southwark Street, London, SE1 0SW
>
> This firm is authorised and regulated by the Solicitors Regulation
> Authority (SRA ID 427552)
>
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
--
- ╔═══════════════════╦══════════════════════════════════════════╗
- ║ Martin Lomas ║ OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7 ║
- ║ martin@ ml1 co uk ║ Import from hkp://subkeys.pgp.net or ║
- ║ ----------------- ║ http:// ml1 .co .uk/martin_ml1_co_uk.gpg ║
- ╚═══════════════════╩══════════════════════════════════════════╝
More information about the Nottingham
mailing list