Two local "ReStore" places, which are sales outlets somehow related to Habitat For Humanity:
http://www.chesapeakerestore.org/index.php
http://habitat.montgomery.md.us/restore/index.html
The list of what the the chesapeake one takes is pretty liberal:
http://www.chesapeakerestore.org/donate/guidelines.php
http://habitat.montgomery.md.us/restore/donate.html?gclid=CNmUlcOu6qoCFcmG5godR0InNg#whatweaccept
The Chesapeake one has a list to other Habitat For Humanity locations, which shows a Hyattsville (Brentwood) location.
http://www.habitat.org/cd/env/restore.aspx
http://www.habitat.org/cd/env/restore_detail.aspx?place=45
I wonder if it's this "Community Forklift" location, which has a surprizing number of restrictions on what it will take:
http://search.earth911.com/location/0NmZ0VmZ/?what=Reusable+Appliance+Donation&where=20785&max_distance=25&country=US&province=MD&city=Hyattsville®ion=Prince+Georges&postal_code=20785&latitude=38.9186166005&longitude=-76.8823417396&family_id=98&list_filter=all
http://communityforklift.com/Donation.cfm
http://communityforklift.com/departments/appliances.cfm
Friday, August 26, 2011
Sunday, August 7, 2011
Batch text replace (using grep and sed to replace all occurances of a string in all files recursively through directories)
Easy enough, just grep for the string, and pass the returned file list into sed using xargs. But what about the details?
This site was my best hit on google using the obvious search:
http://stackoverflow.com/questions/1169927/using-sed-and-grep-to-search-and-replace
I used a slighly different set of arguments when I did it, since egrep seems like a royal pain for my purposes. I added a -t to my xargs call so I could monitor what it did each time it did it:
grep -l oldstring *.* | xargs -l -t sed -i -e 's/oldstring/NEWSTRING/g'
Here's a version using find that worked for me:
$ find . -name "*.htm" | xargs -l -t sed -i -e 's/oldstring/NEWSTRING/g'
Here's a novel way to just search for the files that have the string. Might be interesting to find a way to link this up with xargs for the substitution. Not sure what the extra backslash is about:
find . -exec grep -l “string to find” {} \;
This site was my best hit on google using the obvious search:
http://stackoverflow.com/questions/1169927/using-sed-and-grep-to-search-and-replace
I used a slighly different set of arguments when I did it, since egrep seems like a royal pain for my purposes. I added a -t to my xargs call so I could monitor what it did each time it did it:
grep -l oldstring *.* | xargs -l -t sed -i -e 's/oldstring/NEWSTRING/g'
Here's a version using find that worked for me:
$ find . -name "*.htm" | xargs -l -t sed -i -e 's/oldstring/NEWSTRING/g'
Here's a novel way to just search for the files that have the string. Might be interesting to find a way to link this up with xargs for the substitution. Not sure what the extra backslash is about:
find . -exec grep -l “string to find” {} \;
Subscribe to:
Posts (Atom)