Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #789
| From | no.top.post@gmail.com |
|---|---|
| Newsgroups | alt.os.linux.slackware, comp.os.linux.misc |
| Subject | Re (2): *nix general purpose database |
| Date | 2011-04-18 16:36 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <iohpan$e1g$1@dont-email.me> (permalink) |
| References | <gi4878-e9k.ln1@206-248-139-163.dsl.teksavvy.com> |
Cross-posted to 2 groups.
In article <gi4878-e9k.ln1@206-248-139-163.dsl.teksavvy.com>, nobody wrote: -- snip -- > > Of course `apropos` is already part of what I/we need. > > > > I don't know much about data-bases, but when I eg. > > move one of the 2 papers ' bla Hulett bla1', 'bla2 Hulett' > > to filing cabinet3, draw2 I want the dbase to be able to > > tell me 13 weeks later where to find <all the 'Hulet'>. > > > > And to list that Hulett:1 belongs to class Y and Z, > > and that Hulett:2 belongs to classes X and Z. > > > > And to be able to add/map further attributes, as I become > > familiar with the capabilities of the utility. > > A lot can be done with a flat-file database, using > character-delimited fields and awk to select and format records. > I hate awk. I hate learning another syntax. I want menu driven. Awk has punished me already. While you kiddies have taken my thread and diverted it, I've had a remarkable revelation: I've often found that if you've got a nagging problem, a solution EXISTS if you just allocte effort to find one. Since there's a PERFECT mapping from the dir[sub] tree to physical locations, I can have one file per paper-document. So if I move the concertina-file [with pockets A toZ] from location A to B; this maps perfectly to `moving its sub-dir from A to B', which is a primitive operation in *nix !! Personally I like to use mc, then I can SEE the dir-tree and the files being moved. And I like menu-driven. When I get in the elevator/lift, I select a button. I don't type a messaage to 'the little man in the box'. So then how do I find the physical location of all docos which have Subject (X and Y) or Z, AND attribute Atr, being c ? Perhaps each file could look like:--- Title: <long string description> SubjectRelatedTo: <semicolonSeparatedStrings> <NextAttribute>: <semicolonSeparatedStrings> So based on the < find & multi-grep script> that I got from this forum [it's always best to get a general utility which you can re-use/modify later] to `find all files D days old, in the sub-tree that contain string1 & string2 & string...N, I guess I'd have to replace `grep string1` with ... ? PS. I'm trying to design the script while writing this. I think it's called 'literate programming': instead of writing the man AFTER the thing seems to test ok. So to find the file which has Subject: (dog & cat) OR fish, eg. a file with Subject: dog, cat, cow AND the file which has: Subject: horse, fish using the on-hand well proven script:--- find . -type f -ctime -$1 -print0 | \ xargs -0 grep -l $2 | tr "\n" "\0" | \ xargs -0 grep -l $3 | tr "\n" "\0" | \ xargs -0 grep -l $4 it seems like | grep "Subject:" | grep "fish" would find the file with "Subject: horse, fish" I'm sure this is more interesting than discussing the political-history of *nix shells. My sample script has good reason to use find: for the age; AND this conveniently passes the list-of-files to the cascade of greps. So till you tell me better HOW2, I'll just blindly use `find <theLocationTree> -type f` and then `| grep "Subject:" ` and then `| grep "fish" ` WOW, it seems to work. Thanks for the help. Now let's refine it so that "Subject:" is at the start of a line. ...etc. == Chris Glur.
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
*nix general purpose database no.top.post@gmail.com - 2011-04-10 07:49 +0000
Re: *nix general purpose database "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-10 03:58 -0400
Re: *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-13 15:09 +0000
Re: *nix general purpose database (going OT testing pre-easter mead) Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2011-04-13 17:04 +0000
Re: *nix general purpose database (going OT testing pre-easter mead) Grant Edwards <invalid@invalid.invalid> - 2011-04-13 17:15 +0000
Re: *nix general purpose database (going OT testing pre-easter mead) Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2011-04-13 18:36 +0000
Re: *nix general purpose database (going OT testing pre-easter mead) Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-13 18:20 +0000
Re: *nix general purpose database (going OT testing pre-easter mead) Mike Jones <luck@dasteem.invalid> - 2011-04-13 18:34 +0000
Re: *nix general purpose database (going OT testing pre-easter mead) Jim Diamond <Jim.Diamond@deletethis.AcadiaU.ca> - 2011-04-13 19:36 -0300
Re: *nix general purpose database (going OT testing pre-easter mead) "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-14 10:27 -0400
Re: *nix general purpose database (going OT testing pre-easter mead) Mike Jones <luck@dasteem.invalid> - 2011-04-14 17:47 +0000
Re: *nix general purpose database (going OT testing pre-easter mead) "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-14 13:55 -0400
Re: *nix general purpose database (going OT testing pre-easter mead) Mike Jones <luck@dasteem.invalid> - 2011-04-14 20:29 +0000
Re: *nix general purpose database (going OT testing pre-easter mead) Mike Jones <luck@dasteem.invalid> - 2011-04-14 17:48 +0000
Re: *nix general purpose database "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-14 10:21 -0400
Re: *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-14 15:27 +0000
Re: *nix general purpose database "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-14 11:34 -0400
Re: *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-14 16:54 +0000
Re: *nix general purpose database "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-14 14:02 -0400
Re: *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-14 18:54 +0000
Re: *nix general purpose database "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-04-14 22:20 +0200
Re: *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-14 21:20 +0000
Re: *nix general purpose database "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-04-15 00:17 +0200
Re: *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-15 14:38 +0000
Re: *nix general purpose database "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-14 18:41 -0400
Re: *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-15 14:36 +0000
Re: *nix general purpose database "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-15 10:39 -0400
Re: *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-15 15:20 +0000
Re: *nix general surgeon advises flames may warp and coding is dangerous to your health Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2011-04-15 16:34 +0000
Re: *nix general surgeon advises flames may warp and coding is dangerous to your health Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-15 18:00 +0000
Re: *nix general purpose database Eef Hartman <E.J.M.Hartman@tudelft.nl> - 2011-04-15 09:57 +0200
Re: *nix general purpose database Stan Bischof <stan@worldbadminton.com> - 2011-04-14 16:57 +0000
Re: *nix general purpose database "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-04-14 22:30 +0200
Re: *nix general purpose database Stan Bischof <stan@worldbadminton.com> - 2011-04-15 19:02 +0000
Re: *nix general purpose database John Hasler <jhasler@newsguy.com> - 2011-04-15 15:26 -0500
Re: *nix general purpose database Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2011-04-14 16:42 +0000
Re (2): *nix general purpose database no.top.post@gmail.com - 2011-04-18 16:36 +0000
Re: Re (2): *nix general purpose database Sylvain Robitaille <syl@alcor.concordia.ca> - 2011-04-18 17:04 +0000
Re: *nix general purpose database Chick Tower <c.tower@deadspam.com> - 2011-04-11 18:33 +0000
Re: *nix general purpose database Eef Hartman <E.J.M.Hartman@tudelft.nl> - 2011-04-12 17:22 +0200
Re: *nix general purpose database Chick Tower <c.tower@deadspam.com> - 2011-04-28 15:21 +0000
csiph-web