Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux.debian > #8418
| From | Dan Purgert <dan@djph.net> |
|---|---|
| Newsgroups | alt.os.linux.debian |
| Subject | Re: Simple script fools me? |
| Date | 2016-09-29 14:18 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <slrnnuq8ja.78j.dan@xps-linux.djph.net> (permalink) |
| References | <nsivjc$ckm$1@dont-email.me> <nsj70m$4vp$1@dont-email.me> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 William Unruh wrote: > On 2016-09-29, dog@gmail.com <dog@gmail.com> wrote: >> Simple script fools me? >> >> #!/bin/bash >> echo -n " find files here containing PHRASE: " >> echo $1 >> find . -type f | \ >> grep -v pdf | \ >> grep -v wav | \ >> grep -v mp3 | \ >> xargs grep -l "$1" | grep -v grep >> exit. > > Uh, why not just > grep -r -l "$1" . > instead of all those grep phrases? > YOu could then filter out all those files you do not want. > > grep -r -l "$1" 2>/dev/null |egrep -v 'pdf$|wav$|mp3$' or, find . -type f -name "$1" (or *$1*) | egrep -v 'pdf|wav|mp3' -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJX7SJpAAoJEI4R3fMSeaKBpoQH/1xtKlg/xgXlSAF+PEmjRYYn a+7rb6p22olCn35x5V1IFZvZSWNpnYnDBRPDdNNNdmGqxMtvbcB6epkwBIColnET JduwZsW6DUy5DTXRg75fGSGLZ5yTUFL5aZPhD2HuDIBI3xSwTiTuljQj/xSEME59 lhiLEEN4Fktj1xth8BlDbZ5AFZPnXb2dCDbTB8vyjxZ9WW5XvYRQJ7HgvPlYp5od PiJwnR8qrXFnrzckg238ZmU7UVnLj1X/rwVcxeb6/PC4Bp5lGcMKNGfHJA2GKRsB phVS72qvBxwn0OZjXB6ZPEwRtR3nuEoYkEZxNtw2aQE7VuoyDWK0XWW8+p8eHEY= =CXC8 -----END PGP SIGNATURE----- -- |_|O|_| Registered Linux user #585947 |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5 4AEE 8E11 DDF3 1279 A281
Back to alt.os.linux.debian | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Simple script fools me? dog@gmail.com - 2016-09-29 11:57 +0000
Re: Simple script fools me? William Unruh <unruh@invalid.ca> - 2016-09-29 14:04 +0000
Re: Simple script fools me? Dan Purgert <dan@djph.net> - 2016-09-29 14:18 +0000
Re: Simple script fools me? William Unruh <unruh@invalid.ca> - 2016-09-29 15:45 +0000
Re: Simple script fools me? Dan Purgert <dan@djph.net> - 2016-09-29 18:16 +0000
Re: Simple script fools me? Ivan Shmakov <ivan@siamics.net> - 2016-10-04 17:50 +0000
csiph-web