landscape architecture software

2009-10-29 Thread Greg Rundlett (freephile)
I wanted to do some modelling of my home landscaping. Anyone know of an application that does this (Linux-compatible of course)? There are many software packages available for Windows, but I can't seem to find any that are linux compatible. I thought to try my hand at using Blender, but I'd

grep, maybe

2009-10-29 Thread Maurice
Looking for some guidance; I have several files within several folders (5 files per folder, and thousands of folders) that I need to search a text file within each folder for a word match (like three_little_pigs.txt, and I need to find moe, if he's listed) and then when a match is found I need

Re: grep, maybe

2009-10-29 Thread Drew Van Zandt
grep -r greps all files recursively. grep -l outputs only the names of files which contain matching text. To move the folders, you would have to process that output to select the directory, then move the directory. Probably a perl or shell scripting task. AFAIK grep has nothing so specific as

Re: grep, maybe

2009-10-29 Thread Ben Scott
On Thu, Oct 29, 2009 at 11:38 AM, Maurice mauri...@cds-cumberland.org wrote: I need to search a text file within each folder for a word match (like three_little_pigs.txt, and I need to find moe, if he's listed) and then when a match is found I need to move (not copy) that entire folder (and

Re: grep, maybe

2009-10-29 Thread mark
On Thu, Oct 29, 2009 at 11:38 AM, Maurice mauri...@cds-cumberland.orgwrote: Looking for some guidance; I have several files within several folders (5 files per folder, and thousands of folders) that I need to search a text file within each folder for a word match (like three_little_pigs.txt,

Re: grep, maybe

2009-10-29 Thread Joshua Judson Rosen
mark prg...@gmail.com writes: On Thu, Oct 29, 2009 at 11:38 AM, Maurice mauri...@cds-cumberland.org wrote: Looking for some guidance; I have several files within several folders (5 files per folder, and thousands of folders) that I need to search a text file within each folder for a

Re: grep, maybe

2009-10-29 Thread Ken D'Ambrosio
Oooh! A challenge! Here's my solution: #!/bin/sh cd /path/to/toplevel/dir find -type d | while read i do grep moe $i/* mv $i /path/to/destination || echo mv didn't work: $? done -Ken On Thu, October 29, 2009 1:31 pm, mark wrote: On Thu, Oct 29, 2009 at 11:38 AM, Maurice

Re: grep, maybe

2009-10-29 Thread Ben Scott
On Thu, Oct 29, 2009 at 2:31 PM, Ken D'Ambrosio k...@jots.org wrote: find -type d | while read i do grep moe $i/* mv $i /path/to/destination || echo mv didn't work: $? done Hmmm, does the find execute concurrently with the grep? If it does, then you're liable to confuse the hell out of

Re: grep, maybe

2009-10-29 Thread Ben Scott
On Thu, Oct 29, 2009 at 2:20 PM, Joshua Judson Rosen roz...@geekspace.com wrote:    grep --recursive --files-with-matches $searchstring $topdir \    | xargs --max-args=1 dirname \    | sort --unique \    | xargs mv --target-directory=$newloc I like it. I didn't know about the

Re: grep, maybe

2009-10-29 Thread Ken D'Ambrosio
Interesting point. Three replies: 1) If you're mv'ing onto the same filesystem, the inodes will never change, and it won't matter. 2) I imagine grep will only spit out a status (which is what the parses) after it's finished running, though I'd have to verify that empirically. 3) You can cheat,

Re: grep, maybe

2009-10-29 Thread Ken D'Ambrosio
Wups! Sorry -- I read your question wrong: Does *find* run concurrently*. I'd had other concerns, and mis-read your question to fit my thinking. D'oh! It's been my experience that find doesn't get confused, it just gets miffed, and moves on. -Ken On Thu, October 29, 2009 5:03 pm, Ken

Remember your pearls [was grep, maybe]

2009-10-29 Thread Greg Rundlett (freephile)
Not an answer to the OP, but a follow-on. So, you've worked out a magnificent one-liner solution to a interesting and recurring task. How do you 'remember' your solution? Do you create a file with scripts and comments? Do you post it in a wiki? A blog? An IDE with snippets? Do you remember it

Re: grep, maybe

2009-10-29 Thread Joshua Judson Rosen
Ben Scott dragonh...@gmail.com writes: On Thu, Oct 29, 2009 at 2:20 PM, Joshua Judson Rosen roz...@geekspace.com wrote: Don't be afraid to ask (Lf.((Lx.xx) (Lr.f(rr. Okay, I'll ask: What does that stuff to the right mean? The other half of the whole habanero pepper. :) More